forked from PrivateCoffee/small
fix(proxy): specify Forwarded headers in ProxyFix
Updated the ProxyFix middleware configuration to explicitly include Forwarded headers for IP address, protocol, host, and port. This enhances reliability of request data handling when the app is behind a reverse proxy, ensuring correct client information is passed to the app.
This commit is contained in:
parent
e3eba93f4e
commit
bf512f5e07
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ def main():
|
|||
app.debug = True
|
||||
|
||||
if int(environ.get("PROXY_FIX", 0)):
|
||||
app.wsgi_app = ProxyFix(app.wsgi_app)
|
||||
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1, x_host=1, x_port=1)
|
||||
|
||||
app.run(port=port)
|
||||
|
||||
|
|
Loading…
Reference in a new issue