Open bio-boris opened 8 months ago
@bio-boris I think that is basically correct (although each url should include the protocol https://, but I'm sure you just begin brief, which I just spoiled.)
I'm not sure there is a valid case for the host being empty, though.
The host name for the initial request needs to be propagated by each proxy between the original client request and the upstream service.
The host should be available in the Host header, and available in nginx with the $http_host
or $http
nginx variables. They are similar but different.
Hmm, maybe I will add a README section about how SW2 needs to run behind a proxy and the headers
http_host
should be set to https://subdomain.kbase.ushttp
should be set to https://subdomain.kbase.usand this needs to match config values of allowed subdomains or else it will throw an error that that subdomain is not allowed.
Request at staging.kbase.us
Query: Headers {host = ''} Response
Query: Headers {host = 'staging2.kbase.us'} Response
Request at staging2.kbase.us
Query: Headers {host = ''} Response
Query: Headers {host = 'staging3.kbase.us'} Response