[Labs-l] Redirecting from http to https with lighthttp

Dan Michael O. Heggø danmichaelo+wikipedia at gmail.com
Mon Dec 9 15:33:29 UTC 2013


No, it only adds HTTP_X_FORWARDED_FOR, HTTP_X_FORWARDED_HOST
and HTTP_X_FORWARDED_SERVER.

Liangent, thanks for the link.

Dan Michael



On 9 December 2013 16:21, Ryan Lane <rlane32 at gmail.com> wrote:

> X_FORWARDED_PROTO is what you're looking for. Maybe the proxy is already
> adding that?
>
>
> On Mon, Dec 9, 2013 at 9:34 AM, Dan Michael O. Heggø <
> danmichaelo+wikipedia at gmail.com> wrote:
>
>> Aha... so then there is no way to know if the connection to the proxy is
>> secure or not? Would it be possible to configure the proxy server to
>> add HTTP_X_FORWARDED_SSL or HTTP_X_FORWARDED_PORT or something else that
>> could be checked in php?
>>
>> Dan Michael
>>
>>
>> On 9 December 2013 14:52, Marc A. Pelletier <marc at uberbox.org> wrote:
>>
>>> On 12/09/2013 05:41 AM, Dan Michael O. Heggø wrote:
>>> > I'm trying to enforce https for my tool. With webservice started[1], I
>>> > tried putting
>>> >
>>> > $HTTP["scheme"] == "http" {
>>> >   url.redirect = (".*" => "https://tools.wmflabs.org$0")
>>> > }
>>> >
>>> > in my .lighthttpd.conf, but it results in an infinite redirect loop.
>>> >
>>> > Dan Michael
>>> >
>>> > [1]
>>> https://wikitech.wikimedia.org/wiki/Nova_Resource:Tools/Help/NewWeb
>>>
>>> That's because the proxy accepts both but always connects to your
>>> lighttpd over HTTP internally - causing your tool to always redirect.
>>>
>>> -- Marc
>>>
>>>
>>>
>>> _______________________________________________
>>> Labs-l mailing list
>>> Labs-l at lists.wikimedia.org
>>> https://lists.wikimedia.org/mailman/listinfo/labs-l
>>>
>>
>>
>> _______________________________________________
>> Labs-l mailing list
>> Labs-l at lists.wikimedia.org
>> https://lists.wikimedia.org/mailman/listinfo/labs-l
>>
>>
>
> _______________________________________________
> Labs-l mailing list
> Labs-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/labs-l
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wikimedia.org/pipermail/labs-l/attachments/20131209/6747e5da/attachment.html>


More information about the Labs-l mailing list