Specialist HTTP directives
sub_filter (http-sub)
Replaces matching strings in eligible response bodies.
Formal Syntax & Structure
nginx syntaxnginx
sub_filter string replacement;Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| search | string or expression | Match text case-insensitively; variables supported since 1.9.4. |
| replacement | string or expression | Substitute matched text. This is not a structured HTML parser. |
Working Example
Example Snippetnginx
sub_filter "LEARNING_MARKER" "ByteMind";