Had a look at the PrefixMiddleware, though from reading the example on http://pythonpaste.org/deploy/class-paste.deploy.config.PrefixMiddleware.html I need to figure out how to apply this to the /login scenario, ie how to get the middleware to only target certain urls to have the scheme changed to https.
Intuitively, this seems like something that should be configured in view code. Would this be a bad idea? On Jan 25, 9:39 pm, Chris McDonough <[email protected]> wrote: > On Wed, 2012-01-25 at 13:19 -0800, guyc wrote: > > Hi > > > Apologies if I've missed this in the docs but I need a bit of steer > > with using https and pyramid. Thinking of using nginx as a proxy as > > per the docs deployment example and want to know if the recommended > > approach is to use rewrite rules at the proxy level to switch to https > > or should this be done in pyramid. If the latter, then how is this > > achieved? > > > E.g. if a user requestshttp://mysite//loginand this needs to go over > > https, how can this be switched/redirected tohttps://mysite//loginin > > pyramid? > > If you're using the latest Pyramid (which uses Waitress as a default > WSGI server), see: > > http://docs.pylonsproject.org/projects/waitress/en/latest/#using-behi... > > Most of that advice is applicable for any WSGI server, FWIW. > > - C -- 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.
