Posted On: Feb 22, 2018
A sub_filter directive in Nginx is a replacement string. It allows you to perform modifications by replacing specific string to another one. The updated version of Nginx allows you to use multiple sub_filter directives simultaneously. There are different sub_filter directives for different purposes like
To set a string replacementSyntax: sub_filter string replacement
To preserve the last-modified header
Syntax: sub_filter_last_modified on | off;Default: sub_filter_last_modified off;
To remove the header field with specific contentSyntax: sub_filter_once on | off
Default: sub_filter_once on;
Syntax: sub_filter_types mime-type .
Default: sub_filter_types text/html;
It is always suggested not to use a third party sub filter module, it may be powerful but there can be a lot of bugs. Instead you csj use the standard sub filter for your needs.
Never Miss an Articles from us.
The language in which the Nginx software is written is ‘C’ Language...