comparison xml/en/docs/http/ngx_http_referer_module.xml @ 502:6520338cdf0a

Bring ngx_http_referer_module docs up to date, including: - Documented directives "referer_hash_bucket_size" and "referer_hash_max_size". - Fixed "false" value of the $invalid_referer variable, documented "true" value. - Documented that search for a match of valid referers is case-insensitive.
author Ruslan Ermilov <ru@nginx.com>
date Tue, 24 Apr 2012 06:21:34 +0000
parents 9913f1d51c07
children be54c443235a
comparison
equal deleted inserted replaced
501:3878cc99d454 502:6520338cdf0a
40 </section> 40 </section>
41 41
42 42
43 <section id="directives" name="Directives"> 43 <section id="directives" name="Directives">
44 44
45 <directive name="referer_hash_bucket_size">
46 <syntax><value>size</value></syntax>
47 <default>64</default>
48 <context>server</context>
49 <context>location</context>
50 <appeared-in>1.0.5</appeared-in>
51
52 <para>
53 Sets the bucket size for the valid referers hash tables.
54 For more information, please refer to
55 <link doc="../hash.xml">Setting Up Hashes</link>.
56 </para>
57
58 </directive>
59
60
61 <directive name="referer_hash_max_size">
62 <syntax><value>size</value></syntax>
63 <default>2048</default>
64 <context>server</context>
65 <context>location</context>
66 <appeared-in>1.0.5</appeared-in>
67
68 <para>
69 Sets the maximum <value>size</value> of the valid referers hash tables.
70 For more information, please refer to
71 <link doc="../hash.xml">Setting Up Hashes</link>.
72 </para>
73
74 </directive>
75
76
45 <directive name="valid_referers"> 77 <directive name="valid_referers">
46 <syntax> 78 <syntax>
47 <literal>none</literal> | 79 <literal>none</literal> |
48 <literal>blocked</literal> | 80 <literal>blocked</literal> |
49 <literal>server_names</literal> | 81 <literal>server_names</literal> |
54 <context>location</context> 86 <context>location</context>
55 87
56 <para> 88 <para>
57 Specifies values of the <header>Referer</header> request header field 89 Specifies values of the <header>Referer</header> request header field
58 that will cause the embedded variable <var>$invalid_referer</var> to 90 that will cause the embedded variable <var>$invalid_referer</var> to
59 be set to 0. 91 be set to an empty string.
92 Otherwise, the variable will be set to “<literal>1</literal>”.
93 Search for a match is case-insensitive.
60 </para> 94 </para>
61 95
62 <para> 96 <para>
63 Parameters can be as follows: 97 Parameters can be as follows:
64 <list type="tag"> 98 <list type="tag">
71 <tag-name><literal>blocked</literal></tag-name> 105 <tag-name><literal>blocked</literal></tag-name>
72 <tag-desc> 106 <tag-desc>
73 the <header>Referer</header> field is present in the request header, 107 the <header>Referer</header> field is present in the request header,
74 but its value was deleted by a firewall or proxy server; 108 but its value was deleted by a firewall or proxy server;
75 such values are strings that do not start from 109 such values are strings that do not start from
76 “<literal>http://</literal>”; 110 “<literal>http://</literal>” or “<literal>https://</literal>”;
77 </tag-desc> 111 </tag-desc>
78 112
79 <tag-name><literal>server_names</literal></tag-name> 113 <tag-name><literal>server_names</literal></tag-name>
80 <tag-desc> 114 <tag-desc>
81 the <header>Referer</header> request header field contains 115 the <header>Referer</header> request header field contains
92 126
93 <tag-name>regular expression</tag-name> 127 <tag-name>regular expression</tag-name>
94 <tag-desc> 128 <tag-desc>
95 the first symbol should be a “<literal>~</literal>”. 129 the first symbol should be a “<literal>~</literal>”.
96 It should be noted that an expression will be matched against 130 It should be noted that an expression will be matched against
97 the text starting after the “<literal>http://</literal>”. 131 the text starting after the “<literal>http://</literal>”
132 or “<literal>https://</literal>”.
98 </tag-desc> 133 </tag-desc>
99 134
100 </list> 135 </list>
101 </para> 136 </para>
102 137