mirror of
https://github.com/nginx/nginx.git
synced 2025-06-12 13:42:55 +08:00
disable $realpath_root variable in a "root" directive
This commit is contained in:
parent
9059ecae83
commit
4ca2acfce0
@ -3291,6 +3291,17 @@ ngx_http_core_root(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||||||
return NGX_CONF_ERROR;
|
return NGX_CONF_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ngx_strstr(value[1].data, "$realpath_root")
|
||||||
|
|| ngx_strstr(value[1].data, "${realpath_root}"))
|
||||||
|
{
|
||||||
|
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||||
|
"the $realpath_root variable may not be used "
|
||||||
|
"in the \"%V\" directive",
|
||||||
|
&cmd->name);
|
||||||
|
|
||||||
|
return NGX_CONF_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
lcf->alias = alias;
|
lcf->alias = alias;
|
||||||
lcf->root = value[1];
|
lcf->root = value[1];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user