diff options
Diffstat (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r-- | nginx/ngx_http_js_module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index c6249548..21bcc26a 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -4773,6 +4773,12 @@ ngx_http_js_set(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) *fname = value[2]; + if (v->get_handler == ngx_http_js_variable_set) { + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "variable \"%V\" is already declared", &value[1]); + return NGX_CONF_ERROR; + } + v->get_handler = ngx_http_js_variable_set; v->data = (uintptr_t) fname; |