Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Werkzeug ProxyFix #7347

Closed
revmischa opened this issue Aug 15, 2019 · 1 comment
Closed

Werkzeug ProxyFix #7347

revmischa opened this issue Aug 15, 2019 · 1 comment

Comments

@revmischa
Copy link

Flask didn't answer my question and said to ask here
pallets/flask#3335

The docs say (https://flask.palletsprojects.com/en/1.1.x/deploying/wsgi-standalone/#proxy-setups):

from werkzeug.middleware.proxy_fix import ProxyFix
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1)

I get this from mypy:

qc/create_app.py:47: error: Cannot assign to a method

What's the correct solution here? Why can't I assign to it?

@ilevkivskyi
Copy link
Member

Normally mypy doesn't allow monkey-patching (there is already a feature request about partially enabling this). You can # type: ignore this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants