✨ Support traefik's X-Forwarded-Prefix header

Traefik sets `X-Forwarded-Prefix` to the prefix path
if the stripPrefix middleware is used. Instead of
having to define `X-Script-Name` manually in such
cases, this now makes OctoPrint also check that
header for prefix information.

See also https://doc.traefik.io/traefik/middlewares/http/stripprefix/
This commit is contained in:
Gina Häußge committed 2022-08-02 14:14:34 +02:00
1 parent 8d2d06eeee
commit a355499467
1 file changed
+1 -1
+1 -1
View File
@@ -265,7 +265,7 @@ class ReverseProxiedEnvironment:
# sensible defaults
if header_prefix is None:
header_prefix = ["x-script-name"]
header_prefix = ["x-script-name", "x-forwarded-prefix"]
if header_scheme is None:
header_scheme = ["x-forwarded-proto", "x-scheme"]
if header_host is None: