# At top of file
from werkzeug.config.fixers import ProxyFix
# After 'Create app'
app.wsgi_app = ProxyFix(app.wsgi_app, num_proxies=1)
To learn more about the ProxyFix middleware, please see the Werkzeug documentation.
Data to be updated
# At top of file
from werkzeug.middleware.proxy_fix import ProxyFix
# After 'Create app'
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_proto=1)
To learn more about the ProxyFix middleware, please see the <link>https://werkzeug.palletsprojects.com/en/1.0.x/middleware/proxy_fix/</link> Werkzeug documentation.
Reason
Changed in Werkzeu version 1.0: Deprecated code has been removed:
The num_proxies argument and attribute.
@mattupstate Links: https://pythonhosted.org/Flask-Security/quickstart.html https://flask-security.readthedocs.io/en/3.0.0/quickstart.html
Data there now
To learn more about the ProxyFix middleware, please see the Werkzeug documentation.
Data to be updated
To learn more about the ProxyFix middleware, please see the
<link>https://werkzeug.palletsprojects.com/en/1.0.x/middleware/proxy_fix/</link>
Werkzeug documentation.Reason
Changed in Werkzeu version 1.0: Deprecated code has been removed: The num_proxies argument and attribute.