You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "zwoop (via GitHub)" <gi...@apache.org> on 2024/05/22 16:17:40 UTC
[PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
zwoop opened a new pull request, #11384:
URL: https://github.com/apache/trafficserver/pull/11384
This also adds the [I] / [INV] modifier to operators, where the logic should be INVerted. In this case, inverted means "remove all *but* the listed query parameters".
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on code in PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#discussion_r1610415805
##########
doc/admin-guide/plugins/header_rewrite.en.rst:
##########
@@ -775,6 +775,14 @@ changing the remapped destination, ``<part>`` should be used to indicate the
component that is being modified (see `URL Parts`_). Currently the only valid
parts for rm-destination are QUERY, PATH, and PORT.
+For the query parameter, this operator takes an optional second argument,
+which is a list of query parameters to remove (or keep with ``[INV]`` modifier).
+
+::
+
+ rm-destination QUERY <comma separate list of query parameter>
+
+
Review Comment:
Patches welcome? :-P But yes, that's why I added the new condition here, [INV], for all operators.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2126010520
[approve ci autest]
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "cmcfarlen (via GitHub)" <gi...@apache.org>.
cmcfarlen commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2150651159
Cherry-picked to v10.0.x
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2125197917
I'm adding this to Project 10.0.x, but I think this would be fine to go into v10.1.0 as well.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on code in PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#discussion_r1610415315
##########
doc/admin-guide/plugins/header_rewrite.en.rst:
##########
@@ -1333,6 +1342,11 @@ The following ruleset removes any query parameters set by the client.::
cond %{REMAP_PSEUDO_HOOK}
rm-destination QUERY
+Remove only a few select query parameters:
+
+ cond %{REMAP_PSEUDO_HOOK}
+ rm-destination QUERY foo,bar
+
Review Comment:
Added, thanks!
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2125975877
[approve ci autest]
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "shukitchan (via GitHub)" <gi...@apache.org>.
shukitchan commented on code in PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#discussion_r1610364625
##########
doc/admin-guide/plugins/header_rewrite.en.rst:
##########
@@ -775,6 +775,14 @@ changing the remapped destination, ``<part>`` should be used to indicate the
component that is being modified (see `URL Parts`_). Currently the only valid
parts for rm-destination are QUERY, PATH, and PORT.
+For the query parameter, this operator takes an optional second argument,
+which is a list of query parameters to remove (or keep with ``[INV]`` modifier).
+
+::
+
+ rm-destination QUERY <comma separate list of query parameter>
+
+
Review Comment:
Perhaps to make this a bit more comprehensive, should we make [INV] available to rm-header and rm-cookie as well?
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "mlibbey (via GitHub)" <gi...@apache.org>.
mlibbey commented on code in PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#discussion_r1610363375
##########
doc/admin-guide/plugins/header_rewrite.en.rst:
##########
@@ -1333,6 +1342,11 @@ The following ruleset removes any query parameters set by the client.::
cond %{REMAP_PSEUDO_HOOK}
rm-destination QUERY
+Remove only a few select query parameters:
+
+ cond %{REMAP_PSEUDO_HOOK}
+ rm-destination QUERY foo,bar
+
Review Comment:
Perhaps also
```
Keep only a few select query parameters -- removing the rest:
cond %{REMAP_PSEUDO_HOOK}
rm-destination QUERY foo,bar [I]
```
(if that is indeed how to do it)
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop merged PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2125925110
[approve ci]
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2126077121
[approve ci autest]
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2146194938
[approve ci autest]
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "shukitchan (via GitHub)" <gi...@apache.org>.
shukitchan commented on code in PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#discussion_r1610364625
##########
doc/admin-guide/plugins/header_rewrite.en.rst:
##########
@@ -775,6 +775,14 @@ changing the remapped destination, ``<part>`` should be used to indicate the
component that is being modified (see `URL Parts`_). Currently the only valid
parts for rm-destination are QUERY, PATH, and PORT.
+For the query parameter, this operator takes an optional second argument,
+which is a list of query parameters to remove (or keep with ``[INV]`` modifier).
+
+::
+
+ rm-destination QUERY <comma separate list of query parameter>
+
+
Review Comment:
Perhaps to make this a bit more comprehensive, should we make [INV] available to rm-header and rm-cookie as well?
##########
doc/admin-guide/plugins/header_rewrite.en.rst:
##########
@@ -775,6 +775,14 @@ changing the remapped destination, ``<part>`` should be used to indicate the
component that is being modified (see `URL Parts`_). Currently the only valid
parts for rm-destination are QUERY, PATH, and PORT.
+For the query parameter, this operator takes an optional second argument,
+which is a list of query parameters to remove (or keep with ``[INV]`` modifier).
+
+::
+
+ rm-destination QUERY <comma separate list of query parameter>
+
+
Review Comment:
Perhaps to make this a bit more comprehensive, should we make [INV] available to rm-header and rm-cookie as well?
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2125924743
[approve ci rocky]
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2138409243
@shukitchan I'm going to make a small change to the tokenizer, I think swoc::TextView has a more powerful mechanism here. I'll have it done tonight or tomorrow.
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "shukitchan (via GitHub)" <gi...@apache.org>.
shukitchan commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2140929418
[approve ci autest]
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on code in PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#discussion_r1610415805
##########
doc/admin-guide/plugins/header_rewrite.en.rst:
##########
@@ -775,6 +775,14 @@ changing the remapped destination, ``<part>`` should be used to indicate the
component that is being modified (see `URL Parts`_). Currently the only valid
parts for rm-destination are QUERY, PATH, and PORT.
+For the query parameter, this operator takes an optional second argument,
+which is a list of query parameters to remove (or keep with ``[INV]`` modifier).
+
+::
+
+ rm-destination QUERY <comma separate list of query parameter>
+
+
Review Comment:
Patches welcome? :-P
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2125908157
[approve ci rocky]
[approve ci autest]
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] HRW: Adds an optional list of query params to remove/keep [trafficserver]
Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop commented on PR #11384:
URL: https://github.com/apache/trafficserver/pull/11384#issuecomment-2146086809
[approve ci autest]
--
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: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org