fix CF tests

This commit is contained in:
Thomas Limoncelli 2025-12-04 16:20:39 -05:00
parent 63bafbdd74
commit 0a0e617a20
No known key found for this signature in database
2 changed files with 2 additions and 1 deletions

View file

@ -340,7 +340,7 @@ func cfProxyCNAME(name, target, status string) *models.RecordConfig {
}
func cfSingleRedirectEnabled() bool {
return ((*enableCFRedirectMode) != true)
return (*enableCFRedirectMode)
}
func cfSingleRedirect(name string, code any, when, then string) *models.RecordConfig {

View file

@ -1180,6 +1180,7 @@ func makeTests() []*TestGroup {
testgroup("CF_REDIRECT",
only("CLOUDFLAREAPI"),
alltrue(cfSingleRedirectEnabled()),
tc("redir", cfRedir("cnn.**current-domain**/*", "https://www.cnn.com/$1")),
tc("change", cfRedir("cnn.**current-domain**/*", "https://change.cnn.com/$1")),
tc("changelabel", cfRedir("cable.**current-domain**/*", "https://change.cnn.com/$1")),