fix: Validate x-forwarded-prefix annotation with RegexPathWithCapture (#10598)
This commit is contained in:
parent
9cb3919e84
commit
9cdd51d5dc
3 changed files with 7 additions and 5 deletions
|
|
@ -71,7 +71,7 @@ var (
|
|||
NGINXVariable = regexp.MustCompile(`^[A-Za-z0-9\-\_\$\{\}]*$`)
|
||||
// RegexPathWithCapture allows entries that SHOULD start with "/" and may contain alphanumeric + capture
|
||||
// character for regex based paths, like /something/$1/anything/$2
|
||||
RegexPathWithCapture = regexp.MustCompile(`^/[` + alphaNumericChars + `\/\$]*$`)
|
||||
RegexPathWithCapture = regexp.MustCompile(`^/?[` + alphaNumericChars + `\/\$]*$`)
|
||||
// HeadersVariable defines a regex that allows headers separated by comma
|
||||
HeadersVariable = regexp.MustCompile(`^[A-Za-z0-9-_, ]*$`)
|
||||
// URLWithNginxVariableRegex defines a url that can contain nginx variables.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue