-
Notifications
You must be signed in to change notification settings - Fork 33
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
Custom Node-RED root path ignored #41
Comments
👍 for the awesomely detailed submission I'll dig into this as soon as I have some time |
BTW, I've updated NodeJS and node-red-contrib-home-assistant, and have the same behavior :
|
Thanks for the information. The workaround worked for me! |
Awesome, thank you! |
For anyone running HAProxy instead of nginx, add this to the corresponding
(If you are using |
Would it be possible to post the complete workaround? Name/path of the file, and the whole file, or atleast the whole server {} section. There is enough room in the Internet :) |
@stuomas it depends on how your personal reverse proxy is configured. For me, I'm using HAProxy in front of a 3-node Kubernetes cluster where I'm running NodeRED. I'm rewriting the URL in the backend for that cluster:
|
Summary
When trying to run Node-RED with a custom root path, some 404 errors appear when editing a flow with homeassistant nodes.
The only visible symptom is that autocomplete is broken and a red "404" error is displayed at the top of the page.
Manually filling-in the inputs seems to work fine.
Steps to reproduce
Setup
I've started from scratch on a Debian stretch box, and installed both node-red and node-red-contrib-home-assistant via npm :
(I've stuck to [email protected] to avoid 3.0 issues that are already logged)
No custom root path
After the fresh install, custom root path are disabled in the settings.js :
And Node-RED listens on /
When adding a simple Home Assistant Service node, an ajax call is sent to :
http://[domain]:1880/homeassistant/services
The autocomplete works fine.
Custom httpRoot
In the Node-RED admin, called with "/red", the Ajax calls are still sent to
http://[domain]:1880/homeassistant/services
Which generates
Cannot GET /homeassistant/services
However, if I add the root path manually, it answers correctly :
http://[domain]:1880/red/homeassistant/services
Custom httpAdminRoot
In the Node-RED admin, called with "/admin", the Ajax calls are still sent to
http://[domain]:1880/homeassistant/services
Which generates
Cannot GET /homeassistant/services
However, if I add the root path manually, it answers correctly :
http://[domain]:1880/admin/homeassistant/services
Workaround
I'm running NGinx as a Reverse Proxy. Adding a custom location to proxy to Node-RED works :
The text was updated successfully, but these errors were encountered: