aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_proxy_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/http/modules/ngx_http_proxy_module.c')
-rw-r--r--src/http/modules/ngx_http_proxy_module.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c
index 0828264de..52f67b305 100644
--- a/src/http/modules/ngx_http_proxy_module.c
+++ b/src/http/modules/ngx_http_proxy_module.c
@@ -2276,13 +2276,17 @@ ngx_http_proxy_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
plcf->upstream.location = clcf->name;
+ if (clcf->named
#if (NGX_PCRE)
-
- if (clcf->regex || clcf->noname) {
+ || clcf->regex
+#endif
+ || clcf->noname)
+ {
if (plcf->upstream.uri.len) {
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
"\"proxy_pass\" may not have URI part in "
"location given by regular expression, "
+ "or inside named location, "
"or inside the \"if\" statement, "
"or inside the \"limit_except\" block");
return NGX_CONF_ERROR;
@@ -2291,8 +2295,6 @@ ngx_http_proxy_pass(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
plcf->upstream.location.len = 0;
}
-#endif
-
plcf->upstream.url = *url;
if (clcf->name.data[clcf->name.len - 1] == '/') {