Skip to content

How to use with Traefik reverse proxy #2655

Answered by tjmv
jerome83136 asked this question in Q&A
Discussion options

You must be logged in to vote

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"

Replies: 11 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@tomdavidson
Comment options

Answer selected by robertsLando
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
6 participants
Converted from issue

This discussion was converted from issue #2637 on September 19, 2022 07:23.