On 6/14/12 3:52 PM, Roberto De Ioris wrote:
>> On 6/14/12 11:19 AM, Florian Anderiasch wrote:
>>> On 14.06.2012 15:12, Carlo Pires wrote:
>>>>    >   I am looking to use mongrel2 with SSL.  I would like to add a
>>>> field to
>>>>    >   the headers sent to the handlers notifying them whether or not the
>>>>    >   connection is using SSL.  My reason for doing this is for
>>>> redirects the
>>>>    >   handler needs to know whether to use http or https when building
>>>> the url.
>>>>
>>>> You can prefix redirected urls with "//" and let the browser to solve
>>>> this for you.
>>> IIRC this could be a problem in some IE versions (surprise, surprise).
>>>
>>> More on topic: I could be wrong, but do i.e. Apache and nginx really
>>> have different headers for this SSL: yes/no? We should check a few
>>> common webservers.
>>>
>>> Greetings,
>>> Florian
>> uWSGI handles SSL by introducing a variable into the config of other
>> webservers:
>> *) There are several apache2 modules for uWSGI that (among doing other
>> things) injects a HTTP_SCHEME variable
>> *) nginx supports a uWSGI specific header variable
>> *) cherokee most likely has a uWSGI specific header variable
>>
>> Anyhow, injecting handler specific variables is *not* in the best
>> interests of mongrel2.
>>
>> I might just patch my uWSGI sources to determine whether to prefix urls
>> by http or https in another manner.
>>
>> --Jeff
>>
> Normally webservers tend to set the "HTTPS" cgi variable to "on".
>
> In my opinion mongrel2 should set that one too.
>
> By the way, you do not need to patch uWSGI, simply set the 'scheme'
> variable relative to your platform:
>
> WSGI ->  wsgi.scheme
> PSGI ->  psgi.scheme
> Rack ->  rack.scheme
>
Thanks, Roberto,

I must have overlooked the scheme variable.  Can this be set in an ini file?

--Jeff

Reply via email to