-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] unable to modify files in the store section #1013
Comments
This is a bug with the zwavejs2mqtt addon not here |
I don't think so, because this problem also occours using zwavejs2mqtt as standalone container. |
I cannot reproduce your issue so. When i edit files I get no error |
did you also publish the webinterface to a subdir as well? i‘m using docker image zwavejs/zwavejs2mqtt:latest |
I don't know what you mean. I simply did this:
|
The problem only occurs when using zwavejs behind a reverse proxy, in my case nginx: When I use the root directory of the webserver everything works fine:
But when is try to map zwavejs webinterface to a subdirectory, I'm unable to edit files in the frontend:
As you can see above, I also set the X-External-Path header as described in the manual: https://zwave-js.github.io/zwavejs2mqtt/#/usage/reverse-proxy |
This is the same problem that occurs with hass z2m addon as I think they also use a reverse proxy. Seems that the reverso proxy tranlastes the path in the url... On my side I do: https://github.com/zwave-js/zwavejs2mqtt/blob/master/src/apis/ConfigApis.js#L102 The Maybe this could be a fix: https://stackoverflow.com/questions/28995818/nginx-proxy-pass-and-url-decoding |
Thank you! Now it's working. Here my NGINX config:
Maybe the documentation should be updated as well, shouldn't it? |
Could you make a PR for docs? |
I already updated the docs. |
@oeiber Just for info, isn't
enought? Do you need also:
? |
I'm using zwavejs2mqtt from docker registry, running on my pi4.
the container runs with default settings (http on port 8091) and is proxied using nginx.
when i publish zwavejs2mqtt to the root folder (https://domain.tld/) it works fine. But when publishing to a subfolder (e.g. https://domain.tld/zwave/) i'm unable to access files in the store section in the frontend.
X-External-Path header is set correctly as descriped in the manual. when i try to modify a file i can see the following error ishown in the webinterface:
"Request failed with status code 404"
at the same time docker logs the following error:
Error: Not Found at /usr/src/app/app.js:979:15 at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:317:13) at /usr/src/app/node_modules/express/lib/router/index.js:284:7 at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:335:12) at next (/usr/src/app/node_modules/express/lib/router/index.js:275:10) at /usr/src/app/node_modules/express-session/index.js:502:7 at readCallback (/usr/src/app/node_modules/session-file-store/lib/session-file-helpers.js:193:20) at /usr/src/app/node_modules/graceful-fs/graceful-fs.js:123:16 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:75:3)
btw this behavior can also be reproduced using supervised homeassistant with ingress functionality.
The text was updated successfully, but these errors were encountered: