ethercalc
ethercalc copied to clipboard
Requests to /zappa/socket/__local/... (fail)
What is this request?
/zappa/socket/__local/zgFjzfQ9uhwqROQZAAAD
In my installation of Ethercalc in a subdir this file is always requested from my
domain root. So it should actually fetch them from CustomSubDir/zappa/...
, but it tries to fetch them from /zappa/...
.
BTW: Is this also a websocket?
I'm using --basedir
and also some nginx rewrites (proxy_redirect
).
Yes it is a websocket. Try using --polling
to disable that message.
No, websockets are okay. The issue is just that it is not rewritten correctly. As said I use --basedir
, but @ZappaJS still uses the wrong URL for fetching the file.
So please reopen this issue. It may also be an issue on @ZappaJS's side. So am I right that the basedir
option should add the specified dir to the request path?
So this is a workaround for nginx:
# workaround for https://github.com/audreyt/ethercalc/issues/350
location /zappa/socket/__local/ {
rewrite (.*) /CustomSubDir$1;
}
It's still a workaround. The underlying issue should be fixed. So I advocate for opening this issue again.
Sure! Feel free to work on it. :-)
I have no idea what to change, but maybe someone else knows why @ZappaJS does not use the correct URL...
Hi @audreyt, is there any chance you could look at this old issue which is still relevant today?
I have been changing zappa_prefix
in zappajs/lib/zappa.js
but it's a terrible workaround which also requires more URL rewriting on the reverse proxy.
I also noticed that calls to these /calc/zappa/socket/…
URLs always return the following error, even with the demo https://ethercalc.net/ site:
{
"error": "No session"
}
Doesn't it mean that they could simply be dropped?
That's likely, as we do not make use of cookie-based sessions.
A pull request to remove the call altogether would be appreciated.
Thanks for the feedback. I have looked at the code but I don't have any experience with server-side JS and I haven't found a way to disable this.