5

Problem :

With HTTPS requests my proxy is dropping custom headers from the response :

HTTP request :

$ curl -I -x 127.0.0.1:5566 http://www.google.fr
HTTP/1.1 200 OK
...
X-Servedby: 50001 => My custom header is added to the response

full response : https://gist.github.com/vdaubry/eafabf211957cbe87563

HTTPS request :

$ curl -I -x 127.0.0.1:5566 https://www.google.fr
HTTP/1.1 200 Connection established
Proxy-Agent: Privoxy/3.0.23
X-Servedby: 50001 => doesn't appear in the final response

HTTP/1.1 200 OK
Date: Sat, 07 Feb 2015 16:29:25 GMT
...
Vary: Accept-Encoding

full response : https://gist.github.com/vdaubry/2869d85b2e8affdc5a8c

I don't understand why the custom header is added when the connection opens but is not to the final response ?


More infos :

I have HAProxy load balancing requests to multiple Privoxy instances. HAProxy is adding the privoxy instance name to the response in a custom header "X-Servedby" (like this : How to get name of server that has served request in fronted section?)

It works well with HTPP request but custom headers are dropped with HTTPS requests

Privoxy is set as a transparent proxy (accept-intercepted-requests=1). In the doc it says

Note that intercepting encrypted connections (HTTPS) isn't supported.

Not sure that's related to the problem ?

2
  • That seems the most likely. If you need a proxy that can intercept https, you pretty much have to use squid. Feb 7, 2015 at 17:33
  • Can you post any of your HAProxy config? Are you using TCP or HTTP mode?
    – GregL
    Feb 8, 2015 at 16:37

1 Answer 1

5

If i'm reading this right, you've identified the problem. Your real question seems to be "Header not ADDED when using HTTPS" - is that correct? The proxy is responsible for inserting the header?

If that's the case, it can't be done without intercepting HTTPS as all bar one of the headers (host) are encrypted.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .