@marcel91200 / caddy Mirror · read-only / commits / 66de438a
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 14, 00:15 UTC

caddytls: Fix `MatchRemoteIP` provisoning with multiple CIDR ranges (#4522)

GallopingKylin committed Jan 13, 2022 at 08:56 UTC 66de438a98989135dc1e4ce5aeb0c4bc98af8049
1 file changed +2 -2
modules/caddytls/matchers.go
+2 -2
@@ -86,14 +86,14 @@ func (m *MatchRemoteIP) Provision(ctx caddy.Context) error {
86 if err != nil {
87 return err
88 }
89 - m.cidrs = cidrs
89 + m.cidrs = append(m.cidrs, cidrs...)
90 }
91 for _, str := range m.NotRanges {
92 cidrs, err := m.parseIPRange(str)
93 if err != nil {
94 return err
95 }
96 - m.notCidrs = cidrs
96 + m.notCidrs = append(m.notCidrs, cidrs...)
97 }
98 return nil
99 }