-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
Unable to replace all instances of a given string in request header #72
Comments
Hello @jvanheesch, Thanks for your interest in this Traefik Plugin ! What do you mean when you say:
By all instances, do you mean that you have multiple headers where you want to replace the value. likeReplace:
To:
This is possible by using a plugin configuration that could look like this: - Rule:
Name: 'Header rewriteValue'
Header: 'X-(Real-IP|Forwarded-For)'
Value: '10.(.*)'
ValueReplace: '11.$1'
Type: 'RewriteValueRule' Or do you mean that you have multiple instance of the value in a single header value ? likeReplace:
To:
|
@tomMoulard Thank you for the quick response! I am trying the second, i.e. replacing multiple (all) instances of a string in a single header value. |
Indeed the could be a good fix to add to the |
Reproducer can be found here.
I am unable to replace all instances of a given string
input
with replacement valueoutput
.I checked the source code, but could not come up with a different config that would achieve the desired result.
As a workaround, we currently resort to adding multiple instances of the exact same
RewriteValueRule
.The text was updated successfully, but these errors were encountered: