Le 26/03/2012 20:42, Claude Petit a écrit :
Hi,
Since version 6.1, OpenERP started using python werkzeug has its web
application server. But they didn't implemented SSL. So I have to use
nginx has a proxy. By doing this, I discovered that werkzeug completly
ignores the "X-Forwarded-Proto" header. So I made a little fix. I hope
you will apply it to the next release. I'm not sure if I did the good
thing, you know your code better than me. Thanks.
Hi,
Once again Armin has had a solution for you before you even had the problem.
Although the docs only mention REMOTE_ADDR and HTTP_HOST, the ProxyFix
middleware also fixes wsgi.url_scheme.
Docs:
http://werkzeug.pocoo.org/docs/contrib/fixers/#werkzeug.contrib.fixers.ProxyFix
Code:
https://github.com/mitsuhiko/werkzeug/blob/master/werkzeug/contrib/fixers.py#L81
The docstring could be updated to also mention wsgi.url_scheme.
It is better to do this in an optional middleware than in Werkzeug’s
core. Otherwise, in a non-proxy situation, a client could set any value
it likes just by sending the right headers.
--
Simon Sapin
--
You received this message because you are subscribed to the Google Groups
"pocoo-libs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pocoo-libs?hl=en.