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

Loïc Hoguin essen@REDACTED
Thu Feb 27 16:57:56 CET 2014


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
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>

-- 
Loïc Hoguin
http://ninenines.eu



More information about the erlang-questions mailing list