Skip to content

Commit 69d1c79

Browse files
authored
Fix regex_remap doc for overridable config syntax (#12663)
The documentation incorrectly suggested using @overridable-config=<value> syntax for overriding configuration variables. No such overridable-config option exists. The correct syntax is to use the config name directly with @<config-name>=<value> (e.g., @proxy.config.url_remap.pristine_host_hdr=0). This commit removes the incorrect reference and adds an example.
1 parent 9cf0bf9 commit 69d1c79

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

doc/admin-guide/plugins/regex_remap.en.rst

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,22 @@ remap.config. The following options are available ::
139139
@connect_timeout=<nnn> - Connect timeouts (in ms)
140140
@dns_timeout=<nnn> - Connect timeouts (in ms)
141141

142-
@overridable-config=<value> - see :ref:`ts-overridable-config`
143-
144142
@caseless - Make regular expressions case insensitive
145143
@lowercase_substitutions - Turn on (enable) lower case substitutions
146-
@strategy - Specify a strategy from strategies.yaml. "null" or "" will clear the strategy.
144+
@strategy - Specify a strategy from strategies.yaml. "null" or "" will clear the strategy.
145+
146+
In addition to the options listed above, you can override any configuration
147+
variable from ``records.yaml`` on a per-rule basis. When a regex rule matches,
148+
any overridable configuration specified in that rule will be applied to the
149+
transaction. The syntax is ``@<config-name>=<value>``, for example ::
150+
151+
@proxy.config.url_remap.pristine_host_hdr=0
152+
@proxy.config.http.cache.http=1
153+
154+
These configuration overrides support integer, floating point, and string values,
155+
and will be automatically converted to the appropriate type. See
156+
:ref:`ts-overridable-config` for the complete list of configuration variables
157+
that can be overridden.
147158

148159

149160
This can be useful to force a particular response for some URLs, e.g. ::
@@ -156,3 +167,7 @@ Or, to force a 302 redirect ::
156167

157168
Setting the status to 301 or 302 will force the new URL to be used
158169
as a redirect (Location:).
170+
171+
You can also combine multiple options, including overridable configs ::
172+
173+
^/(.*)?$ https://example.com/sitemaps/$1 @proxy.config.url_remap.pristine_host_hdr=0 @status=301

0 commit comments

Comments
 (0)