Le 29/03/2012 21:14, Claude Petit a écrit :
Thanks. Do you have an example on how to use it ? Is it writing to a
config file (ex.: /etc/werkzeug/werkzeug.conf) ? I don't understand how
it works and what to give to the "app" parameter, neither where to put code.
Hi,
This is a WSGI middleware. Wrap it around a WSGI callable object (or
"application") to get a new WSGI callable.
As for the detailed syntax ... it depends. How are you using Werkzeug?
If you are using Flask:
from werkzeug.contrib.fixers import ProxyFix
from my_flask_project import app
app.wsgi_app = ProxyFix(app.wsgi_app)
If you are just using Werkzeug and making your own WSGI application:
from werkzeug.contrib.fixers import ProxyFix
from my_werkzeug_project import application
application = ProxyFix(application)
--
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.