Skip to content

Commit

Permalink
CLOUDFLARE: Fix another redirect bug (#3034)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlimoncelli authored Jul 2, 2024
1 parent a091da9 commit 937c0dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/cloudflare/singleredirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func makeRuleFromPattern(pattern, replacement string, temporary bool) (string, s
expr = fmt.Sprintf(`concat("https://%s", http.request.uri.path)`, rhost)

} else if strings.Count(host, `*`) == 1 && strings.Count(path, `*`) == 1 &&
strings.Count(replacement, `$`) == 1 && strings.HasPrefix(rpath, `/$2`) {
strings.Count(replacement, `$`) == 1 && strings.HasSuffix(rpath, `/$2`) {
// https://careers.stackoverflow.com/$2
expr = fmt.Sprintf(`concat("https://%s", http.request.uri.path)`, rhost)

Expand Down

0 comments on commit 937c0dc

Please sign in to comment.