Skip to content

Commit 2d20123

Browse files
Auth TLS: Improve redirect RegEx. (#12322)
Co-authored-by: James Strong <[email protected]>
1 parent 567a6c2 commit 2d20123

File tree

1 file changed

+1
-1
lines changed
  • internal/ingress/annotations/authtls

1 file changed

+1
-1
lines changed

internal/ingress/annotations/authtls/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const (
4242

4343
var (
4444
authVerifyClientRegex = regexp.MustCompile(`^(on|off|optional|optional_no_ca)$`)
45-
redirectRegex = regexp.MustCompile(`^((https?://)?[A-Za-z0-9\-.]*(:\d+)?/[A-Za-z0-9\-.]*)?$`)
45+
redirectRegex = regexp.MustCompile(`^((https?://)?[A-Za-z0-9\-.]+(:\d+)?)?(/[A-Za-z0-9\-.]+)*/?$`)
4646
)
4747

4848
var authTLSAnnotations = parser.Annotation{

0 commit comments

Comments
 (0)