Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change cookie_remap plugin to allow use of pre-remap URL (and components). #7519

Merged
merged 1 commit into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions doc/admin-guide/plugins/cookie_remap.en.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Cookie Based Routing Inside TrafficServer Using cookie_remap

* `Comments <#comments>`_
* `cookie: X|X.Y <#cookie-xxy>`_
* `target: purl <#purl>`_
* `operation: exists|not exists|string|regex|bucket <#operation-existsnot-existsstringregexbucket>`_
* `match: str <#match-str>`_
* `regex: str <#regex-str>`_
Expand Down Expand Up @@ -135,6 +136,13 @@ e.g
B.f will operate on fsub
</pre>

target: puri
^^^^^^^^^^^^

----

When the cookie key is omitted, the operation is applied to the request uri instead. If this key and value
is specified, the uri for the operation will be the pre-remapped, rather than the remapped, uri.

operation: exists|not exists|string|regex|bucket
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -359,6 +367,12 @@ and a request like `http://finance.yahoo.com/photos/what/ever/ <http://foo.com/p

will become `http://foo.com/what/ever/matches/x/y/z <http://foo.com/what/ever/matches/x/y/z>`_

Alternatives using pre-remapped URL
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

$cr_req_url, $path and $unamatched_path are based on the remapped URL. To use the pre-remapped
URL, instead use $cr_req_purl, $ppath and $unmatched_ppath, respectively.

An example configuration file
-----------------------------

Expand Down
Loading