Mercurial > hg > nginx-site
comparison xml/ru/docs/http/ngx_http_referer_module.xml @ 76:4a4caa566120
Russian documentation import.
Changes in module.dtd: <example> now allowed to contain <value> and
<emphasis> elements (we need this to show important parts in examples),
less strict checking of <directive> syntax (we don't want to fully
document some directives, notably deprecated ones).
Known issues:
1. <syntax> elements are preserved as is, they will require manual conversion
(likely to some not-yet-existed format a la DocBook cmdsynopsis, as
currently used one seems to be incomplete);
2. <value> no longer corresponds to replaceable content, and it's use in
examples isn't correct;
3. <link doc="document#fragment"> doesn't work with current xslt, either
should be supported or changed to <link doc="document" id="fragment">.
The following files are intentionally omitted: maillists.xml (support.xml
should be used instead), experimental.xml (obsolete), faq.xml (conflicts
with existing one, needs discussion).
Not yet linked to site.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 11 Oct 2011 12:57:50 +0000 |
parents | |
children | 1d315ef37215 |
comparison
equal
deleted
inserted
replaced
75:2bf4cd2787c5 | 76:4a4caa566120 |
---|---|
1 <?xml version="1.0" encoding="utf-8"?> | |
2 | |
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | |
4 | |
5 <module name="Директивы модуля ngx_http_referer_module" | |
6 link="/ru/docs/http/ngx_http_referer_module.html" | |
7 lang="ru"> | |
8 | |
9 <section name="" id="summary"> | |
10 | |
11 <para> | |
12 Модуль ngx_http_referer_module позволяет блокировать доступ | |
13 к сайту с неверными значениями строки "Referer" в заголовке запроса. | |
14 Следует иметь в виду, что подделать запрос с нужной строкой "Referer" | |
15 не составляет большого труда, поэтому цель использования данного модуля | |
16 заключается не в стопроцентном блокировании подобных запросов, | |
17 а в блокировании массового потока запросов, сделанных обычными браузерами. | |
18 Нужно также учитывать, что обычные браузеры могут не передавать cтроку | |
19 "Referer" даже для верных запросов. | |
20 </para> | |
21 | |
22 </section> | |
23 | |
24 | |
25 <section name="Пример конфигурации" id="example"> | |
26 | |
27 <para> | |
28 <example> | |
29 valid_referers none blocked server_names | |
30 *.example.com www.example.info/galleries/ | |
31 ~\.google\. ; | |
32 | |
33 if ($invalid_referer) { | |
34 return 403; | |
35 } | |
36 </example> | |
37 </para> | |
38 | |
39 </section> | |
40 | |
41 | |
42 <section name="Директивы" id="directives"> | |
43 | |
44 <directive name="valid_referers"> | |
45 <syntax>valid_referers | |
46 [none|blocked|server_names|<value>строка</value>] ...</syntax> | |
47 <default>нет</default> | |
48 <context>server, location</context> | |
49 | |
50 <para> | |
51 Директива задаёт значения строки "Referer" в заголовке запроса, при | |
52 которых встроенная переменная $invalid_referer будет иметь значение 0. | |
53 </para> | |
54 | |
55 <para> | |
56 Параметры могут быть следующие: | |
57 <list type="bullet"> | |
58 | |
59 <listitem> | |
60 none — строка "Referer" в заголовке запроса отсутствует; | |
61 </listitem> | |
62 | |
63 <listitem> | |
64 blocked — строка "Referer" в заголовке запроса присутствует, | |
65 но её значение удалено файрволлом или прокси-сервером; к таким строкам | |
66 относятся строки, неначинающиеся на "http://"; | |
67 </listitem> | |
68 | |
69 <listitem> | |
70 server_names — в строке "Referer" в заголовке запроса указано одно | |
71 из имён сервера; | |
72 </listitem> | |
73 | |
74 <listitem> | |
75 произвольная строка — задаёт имя сервера и необязательное начало URI. | |
76 В начале или конце имени сервера может быть "*". | |
77 При проверке порт сервера в строке "Referer" игнорируется. | |
78 </listitem> | |
79 | |
80 <listitem> | |
81 регулярное выражение — в начале должен быть символ "~". | |
82 Необходимо учитывать, что на совпадение с выражением будет проверяться | |
83 текст, начинающийся после "http://". | |
84 </listitem> | |
85 | |
86 </list> | |
87 </para> | |
88 | |
89 <para> | |
90 Пример использования: | |
91 <example> | |
92 valid_referers none blocked server_names | |
93 *.example.com example.* www.example.info/galleries/ | |
94 ~\.google\. ; | |
95 </example> | |
96 </para> | |
97 | |
98 </directive> | |
99 | |
100 </section> | |
101 | |
102 </module> |