mirror of
https://github.com/nginx/nginx.git
synced 2026-09-01 02:58:40 +00:00
Resolver: require name servers.
This commit is contained in:
parent
4542898917
commit
63e8a1d926
1 changed files with 5 additions and 0 deletions
|
|
@ -275,6 +275,11 @@ ngx_resolver_create(ngx_conf_t *cf, ngx_str_t *names, ngx_uint_t n)
|
|||
}
|
||||
}
|
||||
|
||||
if (n && r->connections.nelts == 0) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "no name servers defined");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue