[erlang-questions] Cowboy: is it possible to detect that request is http and redirect to https?

Max Lapshin <>
Thu Feb 27 17:00:24 CET 2014


No, it will not get called, because ranch is going to interpret incoming
traffic as SSL, but it is plain HTTP.



On Thu, Feb 27, 2014 at 7:57 PM, Loïc Hoguin <> wrote:

> The very first argument to init/3 gives you something like {tcp, http} or
> {ssl, http} or {ssl, spdy}, etc.
>
>
> On 02/27/2014 04:56 PM, Max Lapshin wrote:
>
>>
>> I've configured cowboy server to listen on port 443.
>>
>> User is typing: http://server:443/  and see white screen.
>>
>> Is it possible somehow to detect that it is plain http going to ssl port
>> and redirect it to https?
>>
>>
>>
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
> --
> Loïc Hoguin
> http://ninenines.eu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140227/bc881e41/attachment.html>


More information about the erlang-questions mailing list