I have 2 services one is the UI and one is the BACKEND. UI app is served using an nginx server which also acts as a reverse proxy for BACKEND request. My BACKEND uses the REQUEST_URL for some configuration. Normally to ensure that BACKEND picks up the REQUEST_URL correctly, the nginx reverse proxy configuration needs:
location /api {
proxy_pass http://backend/api;
proxy_set_header Host $host; # setting Host header
}
Problem here is that railway $host is a list of IPs not the actual UI configured domain. Current workaround is to set the host manually as an env variable.
Is there another header that contains the actual domain/host?