]> git.kaiwu.me - nginx.git/commit
Referer: fixed $invalid_referer.
authorRuslan Ermilov <ru@nginx.com>
Fri, 4 Aug 2017 05:01:55 +0000 (08:01 +0300)
committerRuslan Ermilov <ru@nginx.com>
Fri, 4 Aug 2017 05:01:55 +0000 (08:01 +0300)
commitc09bba400d233331f1b405e18c6912a30502dee9
tree84fddc2eb166e397cab2ba5362b3b9ed9fe97074
parentd846f27638525f478ea07f5574b5569ce2ab1ac2
Referer: fixed $invalid_referer.

The variable was considered non-existent in the absence of any
valid_referers directives.

Given the following config snippet,

    location / {
        return 200 $invalid_referer;
    }

    location /referer {
        valid_referers server_names;
    }

"location /" should work identically and independently on other
"location /referer".

The fix is to always add the $invalid_referer variable as long
as the module is compiled in, as is done by other modules.
src/http/modules/ngx_http_referer_module.c