Skip to content

Unsupported special characters in Httproute paths with root substitution #6857

@ido4000

Description

@ido4000

Description:
When spec.rules.matches.value contains a special character and the desired substitution is root '/', the routing does not work.
When the substitution is a root target, EG handles the matcher as a PathPrefix, but the UrlRewrite as RegexRewrite. This causes an issue if the matcher contains a $, because:

  • If the $ remained un-escaped in the matcher, it is taken as is to the regexRewrite and there it is treated as an end of regex (which drops everything after the $).
  • If the $ is escaped, the matcher doesn't work (because its match type is PathPrefix).

Relevant code:

Regex: "^" + prefix + `\/*`,

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions