mirror of
https://github.com/nginx/nginx.git
synced 2025-06-13 06:12:44 +08:00
always run regex in server_name to get captures
This commit is contained in:
parent
e231e58367
commit
7b5edd8ffe
@ -1395,7 +1395,12 @@ ngx_http_optimize_servers(ngx_conf_t *cf, ngx_http_core_main_conf_t *cmcf,
|
|||||||
name = addr[a].names.elts;
|
name = addr[a].names.elts;
|
||||||
for (s = 0; s < addr[a].names.nelts; s++) {
|
for (s = 0; s < addr[a].names.nelts; s++) {
|
||||||
|
|
||||||
if (addr[a].core_srv_conf == name[s].core_srv_conf) {
|
if (addr[a].core_srv_conf == name[s].core_srv_conf
|
||||||
|
#if (NGX_PCRE)
|
||||||
|
&& name[s].captures == 0
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1806,7 +1811,11 @@ ngx_http_add_addrs(ngx_conf_t *cf, ngx_http_port_t *hport,
|
|||||||
&& (addr[i].wc_head == NULL
|
&& (addr[i].wc_head == NULL
|
||||||
|| addr[i].wc_head->hash.buckets == NULL)
|
|| addr[i].wc_head->hash.buckets == NULL)
|
||||||
&& (addr[i].wc_tail == NULL
|
&& (addr[i].wc_tail == NULL
|
||||||
|| addr[i].wc_tail->hash.buckets == NULL))
|
|| addr[i].wc_tail->hash.buckets == NULL)
|
||||||
|
#if (NGX_PCRE)
|
||||||
|
&& addr[i].nregex == 0
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user