Skip to content

Commit

Permalink
fix(config): reverse proxy ip ranges parse warning when unset
Browse files Browse the repository at this point in the history
  • Loading branch information
SIMULATAN committed Nov 11, 2024
1 parent f425367 commit 3511090
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,11 @@ func (c *securityConfig) ParseTrustReverseProxyIPs() {
c.trustReverseProxyIpsParsed = make([]net.IPNet, 0)

for _, ip := range strings.Split(c.TrustReverseProxyIps, ",") {
// the config value is empty by default
if ip == "" {
continue
}

// try parse as address range
_, parsedIpNet, err := net.ParseCIDR(ip)
if err == nil {
Expand Down

0 comments on commit 3511090

Please sign in to comment.