Skip to content

Commit

Permalink
Caddyfile support (fix 23/27): cut an exclamation mark before parsing…
Browse files Browse the repository at this point in the history
… NotRanges
  • Loading branch information
vnxme committed Jul 17, 2024
1 parent d19a081 commit c62c64c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/l4tls/matcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ func unmarshalCaddyfileMatchRemoteIP(d *caddyfile.Dispenser) (*caddytls.MatchRem
rangesRaw, notRangesRaw := make([]string, 0, d.CountRemainingArgs()), make([]string, 0, d.CountRemainingArgs())
for d.NextArg() {
val := d.Val()
if val[0] == '!' {
notRangesRaw = append(notRangesRaw, val)
if len(val) > 1 && val[0] == '!' {
notRangesRaw = append(notRangesRaw, val[1:])
} else {
rangesRaw = append(rangesRaw, val)
}
Expand Down

0 comments on commit c62c64c

Please sign in to comment.