We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1f80d4 commit 91bf0e2Copy full SHA for 91bf0e2
server/validators/url.go
@@ -30,8 +30,8 @@ func IsValidOrigin(url string) bool {
30
replacedString := origin
31
// if has regex whitelisted domains
32
if strings.Contains(origin, "*") {
33
- replacedString = strings.Replace(origin, ".", "\\.", -1)
34
- replacedString = strings.Replace(replacedString, "*", ".*", -1)
+ replacedString = strings.ReplaceAll(origin, ".", "\\.")
+ replacedString = strings.ReplaceAll(replacedString, "*", ".*")
35
36
if strings.HasPrefix(replacedString, ".*") {
37
replacedString += "\\b"
0 commit comments