On Aug 3, 12:13 pm, hekevintran <[email protected]> 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 [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