Skip to content

Conversation

@ptekchand
Copy link

If the Header value for a Modify action is of the form
{RegEx}{replacement}
RegEx is a Regular expression
replacement is the string a matched header portion will be replaced with.

Perhaps some users may find this useful - to conditionally replace headers.

My master branch has changes which work replace the channel when the Host header is being modified, though I thought most users may not find that very useful.

…in the value field.

  Any string in the value for a Modify action which matches the form /foo/bar/ triggers the code.
foo can be a regular expression and bar is the string which replaces the match.
  Example:
    Action: Modify
    Name: Host
    Value: /^w{0,3}\.?domain.com$/192.168.254.65/
    This will change www.domain.com and domain.com to 192.168.254.65 if found in the Host header.
    Warning: This wouldn't work for matching '/' (such as in http://)
{RegEx}{replacement}
Changed from forward slash since users may want to match them in URLs such as in the Referer header.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant