Closed fabiokr closed 10 years ago
cc @ysbaddaden
The problem lies in Racker. It shouldn't try to set the remote addr header when the socket is a UNIXSocket (which make it the empty string) and instead make it "127.0.0.1", like if Prax and Racker talked through a local TCPSocket.
Prax is already setting the x forwarded headers, so that could fix the problems.
It isn't fixed yet, as the forwarded ip is empty (because of the UNIXSocket issue).
The unstable branch now sets the REMOTE_ADDR
to 127.0.0.1
instead of the empty string when talking throught a UNIXSocket. Prax already sets the X_FORWARDED
headers correctly, so applications will be capable to determine what thay trust.
Relates to ysbaddaden/prax#32
I was thinking if the proxy shouldn't be responsible from setting the REMOTE_ADDR header and forwarding that to the UNIX socket, as we have the address info at that time. Thoughts?