=encoding utf-8 =head1 NAME ngx_http_sub_module - Module ngx_http_sub_module =head1 The C module is a filter that modifies a response by replacing one specified string by another. This module is not built by default, it should be enabled with the C<--with-http_sub_module> configuration parameter. =head1 Example Configuration location / { sub_filter ' sub_filter I> I>> B I B I B I Sets a string to replace and a replacement string. The string to replace is matched ignoring the case. The string to replace (1.9.4) and replacement string can contain variables. Several C directives can be specified on one configuration level (1.9.4). =head2 sub_filter_last_modified B sub_filter_last_modified I E C> B I B I B I B I This directive appeared in version 1.5.1. Allows preserving the C header field from the original response during replacement to facilitate response caching. By default, the header field is removed as contents of the response are modified during processing. =head2 sub_filter_once B sub_filter_once I E C> B I B I B I B I Indicates whether to look for each string to replace once or repeatedly. =head2 sub_filter_types B sub_filter_types I> ...> B Ihtml> B I B I B I Enables string replacement in responses with the specified MIME types in addition to “Chtml>”. The special value “C<*>” matches any MIME type (0.8.29).