[erlang-questions] Nitrogen on several ports
Wed Mar 14 17:13:50 CET 2012
You can get the socket from Nitrogen and from the socket determine its type:
In code that could be something like
Socket = wf:socket(),
is_tuple(Socket) andalso element(1,Socket)=:=sslsocket.
Though I personally prefer to throw nginx in front of Nitrogen deal
with that kind of routing (URL-based, anyway).
On Wed, Mar 14, 2012 at 9:20 AM, John Hughes <> wrote:
> I’m running nitrogen on inets, configured to serve *two* ports, an ordinary
> ip port and an ssl port. That works fine—nitrogen serves the same
> information on both ports, but if I want to interact securely with the site
> then I can do it on the ssl port.
> What I would LIKE to do is to disable the parts of the site that really
> require secure access, when I visit it through the non-encrypted port. But
> to do that, I need to find out from nitrogen which port the request being
> served came through. Does anyone know of a way to do that?
> erlang-questions mailing list
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm
More information about the erlang-questions