pallets-eco / flask-security

Quick and simple security for Flask applications
MIT License
1.63k stars 513 forks source link

[documentation Label] Update needed in Documentation #864

Open katesinclair91 opened 3 years ago

katesinclair91 commented 3 years ago

@mattupstate Links: https://pythonhosted.org/Flask-Security/quickstart.html https://flask-security.readthedocs.io/en/3.0.0/quickstart.html

Data there now

# 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.