traeak commented on code in PR #12593:
URL: https://github.com/apache/trafficserver/pull/12593#discussion_r4168745045


##########
doc/admin-guide/plugins/header_rewrite.en.rst:
##########
@@ -1338,6 +1338,29 @@ the matching strategy specified in `strategies.yaml`
 Setting to "null" removes the current strategy which will fall back
 to other methods (ie: parent.config or remap to url).
 
+``<name>`` may be a literal strategy name or use `String concatenations`_
+to compute it, e.g. ``set-next-hop-strategy %{CLIENT-HEADER:X-Strategy}``.
+A literal name in a remap rule is resolved once, when the rule is loaded;
+if it cannot be resolved, an error is logged at load time and the
+operator is disabled for that rule. A computed name, or any name in a
+global configuration, is looked up on each transaction. The first lookup
+failure of a rule is logged as an error; later failures of that rule are
+logged only with the ``header_rewrite`` debug tag.
+
+.. note::
+
+   A name computed from client input, such as a request header, lets
+   clients choose among every strategy in ``strategies.yaml``. Guard such
+   rules with conditions that only accept the intended values, e.g.::
+
+      cond %{CLIENT-HEADER:X-Strategy} /^(edge|shield)$/
+      set-next-hop-strategy %{CLIENT-HEADER:X-Strategy} This operator can be
+used in the ``READ_REQUEST_HDR_HOOK`` of a global configuration or the

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to