Skip to content

Commit

Permalink
Fix: use default IP files on format maxmindGeoLite2CountryCSV
Browse files Browse the repository at this point in the history
  • Loading branch information
Loyalsoldier committed Dec 20, 2024
1 parent c6acb91 commit 9711ad4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions plugin/maxmind/country_csv_in.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ func newGeoLite2CountryCSV(action lib.Action, data json.RawMessage) (lib.InputCo
tmp.CountryCodeFile = defaultCCFile
}

if tmp.IPv4File == "" {
// When both of IP files are not specified,
// it means user wants to use the default ones
if tmp.IPv4File == "" && tmp.IPv6File == "" {
tmp.IPv4File = defaultIPv4File
}

if tmp.IPv6File == "" {
tmp.IPv6File = defaultIPv6File
}

Expand Down

0 comments on commit 9711ad4

Please sign in to comment.