aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_core_module.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2007-06-04 20:45:45 +0000
committerIgor Sysoev <igor@sysoev.ru>2007-06-04 20:45:45 +0000
commitbf15d70e10e1a58aa2c143064201b56f41e5e3ac (patch)
tree0c30a2b090868c8d400469d8675af86c7e357c5e /src/http/ngx_http_core_module.c
parent62864d1e1e18af3f6db9f4b282370f3d9eb44276 (diff)
downloadnginx-bf15d70e10e1a58aa2c143064201b56f41e5e3ac.tar.gz
nginx-bf15d70e10e1a58aa2c143064201b56f41e5e3ac.zip
forbid alias inside location given by regular expression
Diffstat (limited to 'src/http/ngx_http_core_module.c')
-rw-r--r--src/http/ngx_http_core_module.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 2334f6daa..d7694783c 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -2674,6 +2674,18 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
return NGX_CONF_ERROR;
}
+#if (NGX_PCRE)
+
+ if (lcf->regex && alias) {
+ ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
+ "the \"alias\" directive may not be used "
+ "inside location given by regular expression");
+
+ return NGX_CONF_ERROR;
+ }
+
+#endif
+
value = cf->args->elts;
if (ngx_strstr(value[1].data, "$document_root")