Hello,

I'm afraid the only solution would be to write a WSGI middleware like:

class SSLOnlyLoginMiddleware(object):

def __init__(self, app):
self.app = app

def __call__(self, environ, start_response):
if environ['PATH_INFO'].startswith("/login/") and
environ['wsgi.url_scheme'] != "https":
headers = [("Location", "https://example.org/login";)]
start_response("301 Moved Permanently", headers)
body = [""]
else:
body = self.app(environ, start_response)

return body

And put it before repoze.what/who.

HTH,

- Gustavo

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en.

Reply via email to