mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
Proxy: fixed upstream search by proxy_pass with variables.
If "proxy_pass" is specified with variables, the resulting hostname is looked up in the list of upstreams defined in configuration. The search was case-sensitive, as opposed to the case of "proxy_pass" specified without variables.
This commit is contained in:
parent
4ae889c9f2
commit
8d288ec49a
@ -612,7 +612,7 @@ ngx_http_upstream_init_request(ngx_http_request_t *r)
|
|||||||
if (uscf->host.len == host->len
|
if (uscf->host.len == host->len
|
||||||
&& ((uscf->port == 0 && u->resolved->no_port)
|
&& ((uscf->port == 0 && u->resolved->no_port)
|
||||||
|| uscf->port == u->resolved->port)
|
|| uscf->port == u->resolved->port)
|
||||||
&& ngx_memcmp(uscf->host.data, host->data, host->len) == 0)
|
&& ngx_strncasecmp(uscf->host.data, host->data, host->len) == 0)
|
||||||
{
|
{
|
||||||
goto found;
|
goto found;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user