Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

Commit

Permalink
feat: configurable geoip2 api available databases
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Dec 22, 2021
1 parent db12891 commit 164a78a
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class CommonConfig {
public static ConfigValue<List<? extends String>> DeloggerRegexFilter;

public static ConfigValue<String> GeoIP2ApiUrl;
public static ConfigValue<List<? extends String>> GeoIP2AvailableDatabases;

static {
ForgeConfigSpec.Builder b = new ForgeConfigSpec.Builder();
Expand All @@ -33,7 +34,12 @@ public class CommonConfig {

{
b.push("ip_lookup");
GeoIP2ApiUrl = b.define("geoip2_api_url", "http://127.0.0.1:80/geoip2/");
{
b.push("geoip2");
GeoIP2ApiUrl = b.define("api_url", "http://127.0.0.1:80/geoip2/");
GeoIP2AvailableDatabases = b.define("available_databases", List.of("asn", "country", "city"));
b.pop();
}
b.pop();
}

Expand Down

0 comments on commit 164a78a

Please sign in to comment.