You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have some issues using the rewritepolicy CRD and I can't tell if it's just not working out or if I miss something.
I have a scenario where I want to rewrite any request containing /somethingblablabla to /someOtherPathblablabla; what is important, is that I want to preserve the appendix of /something, so that in the end it is also attached to the target path.
Therefore I planned to use regex in the rewrite-criteria property like this:
So this doesn't seem to work, the config push failed, when deployed to the k8s cluster. I also did not see any documentation on using regex in the rewrite-criteria field. I then tried out playing around with the multiple-occurence-modify property but that did not work either and that's why I'm here.
How do I specify a rewritepolicy which matches some path containing a regex pattern, and rewrites it to a target path while preserving all of its appendix (I read \n is the equivalent of $n in apache rewrites for preserving path elements) ?
Update:
I found out using multiple-occurence-modify it is possible to provide a regular expression like
Hi,
I have some issues using the rewritepolicy CRD and I can't tell if it's just not working out or if I miss something.
I have a scenario where I want to rewrite any request containing
/somethingblablabla
to/someOtherPathblablabla
; what is important, is that I want to preserve the appendix of/something
, so that in the end it is also attached to the target path.Therefore I planned to use regex in the rewrite-criteria property like this:
So this doesn't seem to work, the config push failed, when deployed to the k8s cluster. I also did not see any documentation on using regex in the rewrite-criteria field. I then tried out playing around with the multiple-occurence-modify property but that did not work either and that's why I'm here.
How do I specify a rewritepolicy which matches some path containing a regex pattern, and rewrites it to a target path while preserving all of its appendix (I read
\n
is the equivalent of$n
in apache rewrites for preserving path elements) ?Update:
I found out using
multiple-occurence-modify
it is possible to provide a regular expression likebut still, the preserving of the suffix right after
/something
is questionable. The syntax\n
doesn't seem to work here.Cheers
The text was updated successfully, but these errors were encountered: