dstack
dstack copied to clipboard
Send common proxy headers to services
Problem
Some services may need to know the IP address of the end user or the entire proxy chain. This can be achieved by having the reverse proxy set special headers when forwarding requests. Currently, the gateway only sets X-Real-IP and the in-server proxy doesn't set anything.
Solution
In both the gateway and the in-server proxy, set all common proxy headers: X-Real-IP, X-Forwarded-For, Forwarded.
Workaround
No response
Would you like to help us implement this feature by sending a PR?
Yes