[nginx] Referer module: added $invalid_referer to variables hash.

Maxim Dounin mdounin at mdounin.ru
Wed May 22 18:54:05 UTC 2013


details:   http://hg.nginx.org/nginx/rev/8f74cf107137
branches:  
changeset: 5221:8f74cf107137
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Wed May 22 22:31:53 2013 +0400
description:
Referer module: added $invalid_referer to variables hash.

This makes it accessible via dynamic lookup with ngx_http_get_variable()
from Perl, SSI, etc.

Patch by Yichun Zhang (agentzh).

diffstat:

 src/http/modules/ngx_http_referer_module.c |  3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diffs (13 lines):

diff --git a/src/http/modules/ngx_http_referer_module.c b/src/http/modules/ngx_http_referer_module.c
--- a/src/http/modules/ngx_http_referer_module.c
+++ b/src/http/modules/ngx_http_referer_module.c
@@ -396,8 +396,7 @@ ngx_http_valid_referers(ngx_conf_t *cf, 
 
     ngx_str_set(&name, "invalid_referer");
 
-    var = ngx_http_add_variable(cf, &name,
-                                NGX_HTTP_VAR_CHANGEABLE|NGX_HTTP_VAR_NOHASH);
+    var = ngx_http_add_variable(cf, &name, NGX_HTTP_VAR_CHANGEABLE);
     if (var == NULL) {
         return NGX_CONF_ERROR;
     }



More information about the nginx-devel mailing list