comparison xml/en/docs/http/ngx_http_sub_module.xml @ 1555:2a79b38f640b

Sub filter: documented support of multiple strings to replace.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 18 Aug 2015 19:14:27 +0300
parents 80aba0439f7d
children dc1e51247404
comparison
equal deleted inserted replaced
1554:80aba0439f7d 1555:2a79b38f640b
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> 8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
9 9
10 <module name="Module ngx_http_sub_module" 10 <module name="Module ngx_http_sub_module"
11 link="/en/docs/http/ngx_http_sub_module.html" 11 link="/en/docs/http/ngx_http_sub_module.html"
12 lang="en" 12 lang="en"
13 rev="3"> 13 rev="4">
14 14
15 <section id="summary"> 15 <section id="summary">
16 16
17 <para> 17 <para>
18 The <literal>ngx_http_sub_module</literal> module is a filter 18 The <literal>ngx_http_sub_module</literal> module is a filter
31 <section id="example" name="Example Configuration"> 31 <section id="example" name="Example Configuration">
32 32
33 <para> 33 <para>
34 <example> 34 <example>
35 location / { 35 location / {
36 sub_filter &lt;/head&gt; 36 sub_filter '&lt;a href="http://127.0.0.1:8080/' '&lt;a href="https://$host/';
37 '&lt;/head&gt;&lt;script language="javascript" src="$script"&gt;&lt;/script&gt;'; 37 sub_filter '&lt;img src="http://127.0.0.1:8080/' '&lt;img src="https://$host/';
38 sub_filter_once on; 38 sub_filter_once on;
39 } 39 }
40 </example> 40 </example>
41 </para> 41 </para>
42 42
54 54
55 <para> 55 <para>
56 Sets a string to replace and a replacement string. 56 Sets a string to replace and a replacement string.
57 The string to replace is matched ignoring the case. 57 The string to replace is matched ignoring the case.
58 The string to replace (1.9.4) and replacement string can contain variables. 58 The string to replace (1.9.4) and replacement string can contain variables.
59 Several <literal>sub_filter</literal> directives
60 can be specified on one configuration level (1.9.4).
59 </para> 61 </para>
60 62
61 </directive> 63 </directive>
62 64
63 65
89 <context>http</context> 91 <context>http</context>
90 <context>server</context> 92 <context>server</context>
91 <context>location</context> 93 <context>location</context>
92 94
93 <para> 95 <para>
94 Indicates whether to look for a string to replace once or 96 Indicates whether to look for each string to replace
95 several times. 97 once or repeatedly.
96 </para> 98 </para>
97 99
98 </directive> 100 </directive>
99 101
100 102