Question about proxy

Francis Daly francis at daoine.org
Tue Jan 31 07:45:52 UTC 2023


On Mon, Jan 30, 2023 at 10:39:52PM -0500, Saint Michael wrote:

Hi there,

> Can you please elaborate on this:
> "You probably want subs_filter_types to include text/html, and you probably
> want "r" on the subs_filter patterns that are regular expressions rather
> than fixed strings"
> one example will suffice.

https://github.com/yaoweibin/ngx_http_substitutions_filter_module includes:

"""
  Example
    location / {

        subs_filter_types text/html text/css text/xml;
        subs_filter st(\d*).example.com $1.example.com ir;
        subs_filter a.example.com s.example.com;
        subs_filter http://$host https://$host;
    }
"""

along with explanations of each directive.

(If that's *not* the module that you are using, then the documentation
for your module should show something similar.)

Although I do see that some later text suggests that text/html content is
always searched, so maybe being explicit about that in subs_filter_types
is not necessary.

Cheers,

	f
-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list