Skip to content

Commit

Permalink
feat(config): warn about LOG_REDACTION=max and PROXIED=false
Browse files Browse the repository at this point in the history
  • Loading branch information
favonia committed Jul 6, 2024
1 parent 39a7a62 commit 9aa2cc8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/config/config_read.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,16 @@ func (c *Config) NormalizeConfig(ppfmt pp.PP) bool {
if !ok {
return false
}
allProxied := true
for dom := range activeDomainSet {
proxiedMap[dom] = proxiedPred(dom)
proxied := proxiedPred(dom)
allProxied = allProxied && proxied
proxiedMap[dom] = proxied
}
// Warn about LOG_REDACTION=ip and PROXIED=false
if ppfmt.ShouldRedact(pp.PrivateDataTypeIPs) && !allProxied {
ppfmt.Warningf(pp.EmojiUserWarning,
"Some domains are not proxied by Cloudflare; their DNS records can leak IP addresses")
}

// Part 3: override the old values
Expand Down

0 comments on commit 9aa2cc8

Please sign in to comment.