1
0
mirror of https://github.com/janeczku/calibre-web.git synced 2024-11-26 08:51:05 +02:00

Use HTTP_X_FORWARDED_HOST instead of HTTP_X_FORWARDED_SERVER

Use HTTP_X_FORWARDED_HOST since HTTP_X_FORWARDED_SERVER holds the hostname of the proxy server on HAProxy/Traefik.
This commit is contained in:
Josh Max 2019-04-03 01:25:29 -07:00 committed by GitHub
parent 4b301a7961
commit cdfb6bf3e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,7 +49,7 @@ class ReverseProxied(object):
scheme = environ.get('HTTP_X_SCHEME', '')
if scheme:
environ['wsgi.url_scheme'] = scheme
servr = environ.get('HTTP_X_FORWARDED_SERVER', '')
servr = environ.get('HTTP_X_FORWARDED_HOST', '')
if servr:
environ['HTTP_HOST'] = servr
return self.app(environ, start_response)