I try to do migration from NGINX to HAProxy. But I have an issue with headers.
When I use NGINX so the proxied request looks like that:
"POST /afterslash/wwv_flow.ajax HTTP/1.1" 204 0 "https://someurl.com/afterslash/f?p=SOMESTRING:REGISTR:0::NO::EMAIL,HASH:anemail%40email.com,D96417C63EC1C4E8CAF113E119C4C5C371520523" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0"
When I use HAProxy it looks:
"POST /afterslash/wwv_flow.ajax HTTP/1.1"
There is a part that missing. I guess that i have to add some “http-request set-header” into my backend, but I am not sure which kind of.
NGINX has this setting related to headers:
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Accept-Encoding “”; #needed for sub_filters
I would say that I could to do this setting below, but I am not sure if rest of rules mentioned above are important as well…
http-request set-header https://someurl.com
http-request set-header X-Forwarded-For %[src]
Let me admit that I can test it just in night because of impact to end users… This is the reason why I am trying to find out a hint here.
Really thanks for any help in advance.