On Aug 3, 1:11 pm, hekevintran <hekevint...@gmail.com> wrote:
> Thanks Graham for the informative answer.  What is the recommended
> solution to this situation?

Effectively what I already said. I don't remember the name of the
special header that WebFaction passes through and I don't know enough
Pylons to say how you would integrate WSGI middleware wrapper to fix
it up.

Do a search on WebFaction's own forums as this issue has been
discussed there before.

Graham

> On Aug 2, 7:43 pm, Graham Dumpleton <graham.dumple...@gmail.com>
> wrote:
>
>
>
> > On Aug 3, 12:13 pm, hekevintran <hekevint...@gmail.com> wrote:
>
> > > I have deployed a Pylons application on WebFaction and I am trying to
> > > use redirect_to in my controller.  My page is using HTTPS.  For some
> > > reason redirect_to is generating urls that are using HTTP for the
> > > protocol.  I am currently getting around this problem by using the
> > > redirect function which allows you to supply a url as a string and
> > > hardcoding my urls.  This works and is okay for now as my application
> > > is small, but it is very inelegant.  Does anyone know why redirect_to
> > > is making urls that have HTTP and not HTTPS?
>
> > Using WebFaction you would be sitting behind nginx and it would be
> > nginx which is handling HTTPS. As a result your application is
> > receiving HTTP only. Thus, wsgi.url_scheme wouldn't be set correctly
> > for when connection to nginx was actually HTTPS. WebFaction do set a
> > custom request header which is passed through to your application to
> > indicate whether connection to nginx was HTTPS or not. You will need
> > some sort of WSGI middleware which looks for that special request
> > header and fixes up wsgi.url_scheme appropriately. As long as that is
> > done, any conforming WSGI application should then do correct thing.
>
> > Graham
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to