Found my mistake - i was using underscores instead of dashes to mark
headers! This works:

frontend  main *:80
    # local stunnel - add profile
    acl              is_local_https src LOCALHOST
    reqadd           HTTP-X-SECURE-RPROXY:\ TRUE    if is_local_https


On Mon, Oct 24, 2011 at 9:08 AM, Alex Davies <[email protected]> wrote:

> Hi,
>
> I've recently moved from Apache to stunnel to provide SSL for haproxy.
>
> I have a need for the application behind haproxy to "know" if the
> connection has come in via HTTP or HTTPS. Previously, we have been injecting
> a custom header (X-SECURE-RPROXY or similar) in Apache if the connection is
> secure; this is then passed on.
>
> I'm using the patched stunnel; there are two obvious options (hardcode a
> new header in the patch, or use a different "frontend" in haproxy for
> stunnel connections) but neither of them appeal; is there a way to inject a
> header for a backend if the source is LOCALHOST (which seems to me the
> neater option)?
>
> Cheers,
>
> Alex
>
>


-- 
Alex Davies

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the sender immediately by e-mail and delete this e-mail permanently.

Reply via email to