NGINX not passing header to proxy

Francis Daly francis at daoine.org
Fri Jan 4 11:47:03 UTC 2019


On Thu, Jan 03, 2019 at 06:17:44PM -0500, Sesshomurai wrote:

Hi there,

>   This problem was resolved with the help of the cloud provider. Turns out I
> need to set the Host header
> 
> proxy_set_header Host upstreamhostname;

Good that you now have it working.

Note that nginx should set the Host: header to the name used in the
proxy_pass directive, so that if your config used the same upstreamserver
string in

    proxy_pass https://upstreamserver/0_1_0/ecfr;

as in the test curl command

    $ curl -i -H "x-api-key:APIKEY" -H "userAccount:USER1" https://upstreamserver/0_1_0/ecfr?index=title48 --insecure

then it should have Just Worked.

But perhaps there were different words edited to the same word for the email.

Thanks for providing the final outcome, so that the next person with
the same issue will have a chance to find the answer in the mailarchive.

Cheers,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list