Paste's own PrefixMiddleware interprets X-Forwarded- headers, as I
discovered when I was trying to figure out why in the world the X-Forwarded-
headers weren't making it to my application. From the docstring:
Also, unless disabled, the ``X-Forwarded-Server`` header will be
translated to th
I would just have a middleware look for that header and rewrite
wsgi.url_scheme appropriately in the environment. You could use repoze.vhm
to do that, but since you only need that one tweak, a few lines of
middleware should really be all you need.
Chris
class RewriteURLSchemeMiddleware(object):
Hi.
We have an application which supports both HTTP and HTTPS. If the user
visits the site via https:// he should stay on that protocol and as
such all links should be generated accordingly.
We do the SSL handling in Nginx in front of the bfg application. So
the application always gets a request.