# HG changeset patch # User Ruslan Ermilov # Date 1327509353 0 # Node ID 3d6c27e2262518d5251efedb03d7e28543c69e35 # Parent ccb8e9a12e2fec6c6a8714573fd6adce82bb103e Translated ngx_http_referer_module into English. diff -r ccb8e9a12e2f -r 3d6c27e22625 xml/en/GNUmakefile --- a/xml/en/GNUmakefile Wed Jan 25 13:57:12 2012 +0000 +++ b/xml/en/GNUmakefile Wed Jan 25 16:35:53 2012 +0000 @@ -67,6 +67,7 @@ http/ngx_http_proxy_module \ http/ngx_http_random_index_module \ http/ngx_http_realip_module \ + http/ngx_http_referer_module \ http/ngx_http_secure_link_module \ http/ngx_http_split_clients_module \ http/ngx_http_sub_module \ diff -r ccb8e9a12e2f -r 3d6c27e22625 xml/en/docs/http/ngx_http_referer_module.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xml/en/docs/http/ngx_http_referer_module.xml Wed Jan 25 16:35:53 2012 +0000 @@ -0,0 +1,116 @@ + + + + + + +
+ + +The ngx_http_referer_module module allows to block +access to a site for requests with invalid values in the +
Referer
header field. +It should be kept in mind that fabricating a request with an appropriate +
Referer
field value is quite easy, and so the intended +purpose of this module is not to block such requests thoroughly but to block +the mass flow of requests sent by regular browsers. +It should also be taken into consideration that regular browsers may +not send the
Referer
field even for valid requests. +
+ +
+ + +
+ + + +valid_referers none blocked server_names + *.example.com example.* www.example.info/galleries/ + ~\.google\.; + +if ($invalid_referer) { + return 403; +} + + + +
+ + +
+ + + + none | + blocked | + server_names | + string + ... + +server +location + + +Specifies values of the
Referer
request header field +that will cause the embedded variable $invalid_referer to +be set to 0. +
+ + +Parameters can be as follows: + + +none + +the
Referer
field is missing in the request header; +
+ +blocked + +the
Referer
field is present in the request header, +but its value was deleted by a firewall or proxy server; +such values are strings that do not start from +“http://”; +
+ +server_names + +the
Referer
request header field contains +one of the server names; +
+ +arbitrary string + +defines a server name and an optional URI prefix. +A server name can have an “*” at the beginning or end. +When checking, the server’s port in the
Referer
field +is ignored; +
+ +regular expression + +the first symbol should be a “~”. +It should be noted that an expression will be matched against +the text starting after the “http://”. + + +
+
+ + +Example: + +valid_referers none blocked server_names + *.example.com example.* www.example.info/galleries/ + ~\.google\.; + + + +
+ +
+ +
diff -r ccb8e9a12e2f -r 3d6c27e22625 xml/en/docs/index.xml --- a/xml/en/docs/index.xml Wed Jan 25 13:57:12 2012 +0000 +++ b/xml/en/docs/index.xml Wed Jan 25 16:35:53 2012 +0000 @@ -185,6 +185,11 @@ + +ngx_http_referer_module + + + ngx_http_secure_link_module