-
-
Notifications
You must be signed in to change notification settings - Fork 206
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Unable to set "base" URI path for use behing a reverse proxy #2637
Comments
Did you also tried the http header way? what's your reverse proxy configuration? |
Hello,
No I didn't.
I'm using Traefik as a reverse proxy so I have to figure out how to
implement this method on it.
Do you think I should give up with the "path" method?
(I think the possibility to set the path thought a docker environment
variable could help a lot of people implementing this easier 😉)
Le lun. 12 sept. 2022 à 09:44, Daniel Lando ***@***.***> a
écrit :
… Did you also tried the http header way?
—
Reply to this email directly, view it on GitHub
<#2637 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJEQYH6TQ77P6DHAOVHZALV53NMFANCNFSM6AAAAAAQJNAOTI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Here is my Traefik configuration (reverse proxy)
But I don't think it will be usefull here as the path is not working by connecting directly to the zwave2mqtt docker instance (http://[IP]:8091/zwave) I think the static pages are not inheriting the "path" configuration. What do you think ? Best regards |
Could you set custom headers? You should add this header:
|
Just commited a change to add |
Hello, Just tried the header way with Traefik; here is the config:
Sadly, it still doesn't work. The "X-External-Path" header is set with the value "/zwave" and when reaching zwavemqtt trought the reverse proxy; the "root" page is accesible with the "/zwave" URI This is the same behaviour than with the "path" config option. Will try with the "BASE_PATH" environment variable when it is released. Best regards |
I encountered the same issues when I set up the service today and happened to see the commit mentioning this issue. The Using Traefik, you need two middlewares or one and the
|
Oh, great tip
Will try it asap
Thank you !
Le jeu. 15 sept. 2022 à 20:04, tjmv ***@***.***> a écrit :
… I encountered the same issues when I set up the service today and happened
to see the commit mentioning this issue. The BASE_PATH environment
variable alone is not enough and has the same effect as the header: This
adds the prefix, but the server is not aware of it and expects everything
to be served from the root. However, you can work around it by first adding
the path in the application and then strip it in the proxy.
Using Traefik, you need two middlewares or one and the BASE_PATH variable
to get it working right now:
zwave2mqtt-inject-basepath:
headers:
customRequestHeaders:
X-External-Path: "/zwave/"
zwave2mqtt-strip-basepath:
stripprefix:
prefixes: "/zwave"
—
Reply to this email directly, view it on GitHub
<#2637 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJEQYHUCLEMN26AO7QE77DV6NQMJANCNFSM6AAAAAAQJNAOTI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
it worked with the @tjmv solution |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Hello,
I just pulled the latest docker image and I'm unable to configure the "base path" of the application in order to use it behind a reverse proxy.
I modified this file: config/app.js and changed this:
exports.base = '/zwave/';
Then restarted the docker.
Then trying to access the app: http://[IP]:8091/zwave
I get these URI generated on these HTTP status code on my browser:
It seems the config works because URIs are generated with "/zwave"; but static elements are not reachable on the new path.
Did I miss something ?
When manually changing the static URI; it works:
http://[IP]:8091/static/css/app.e7f63f8bf06c7dd2f2ba.css --> HTTP/200
I was also unable to apply the documented procedure here: https://zwave-js.github.io/zwavejs2mqtt/#/usage/reverse-proxy?id=using-the-configuration
Thank you for your help
Best regards
The text was updated successfully, but these errors were encountered: