Re: stunnel - > HAproxy -> app: making the app aware that SSL is in use

From: Brane F. Gračnar <brane.gracnar#najdi.si>
Date: Wed, 28 Sep 2011 12:40:59 +0200


On Wednesday 28 of September 2011 12:06:48 Graeme Donaldson wrote:
> L on some pages. We have stunnel doing the SSL
> in front of HAproxy and app servers behind HAproxy running
> Apache+mod_wsgi. We need to be able to tell the app that a request is
> using SSL, because right now they just see plain HTTP.
>
> Any tips on how to do this?

frontend FE_BEHIND_STUNNEL

        bind a.b.c.d:8000

	reqidel ^X-SSL
	reqadd X-SSL:\ 1

backend WS
	option http-server-close
	option forwardfor

	server s1 x.y.z.w:80

App then needs to inspect "X-SSL" header and act according to it's value.

Best regards, Brane Received on 2011/09/28 12:40

This archive was generated by hypermail 2.2.0 : 2011/09/28 12:45 CEST