Skip to content

Commit

Permalink
Add comment, fix import
Browse files Browse the repository at this point in the history
  • Loading branch information
timokoessler committed Jan 31, 2025
1 parent 2561ff5 commit 58e6900
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion library/agent/ServiceConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IPMatcher } from "../helpers/ip-matcher/IPMatcher";
import { LimitedContext, matchEndpoints } from "../helpers/matchEndpoints";
import { Endpoint } from "./Config";
import { IPList as IPList } from "./api/fetchBlockedLists";
import { IPList } from "./api/fetchBlockedLists";

export class ServiceConfig {
private blockedUserIds: Map<string, string> = new Map();
Expand Down Expand Up @@ -145,6 +145,9 @@ export class ServiceConfig {
this.setOnlyAllowedIPAddresses(ipAddresses);
}

/**
* Returns true if only some IP addresses are allowed to access the service, e.g. if a geoip country allowlist is set.
*/
shouldOnlyAllowSomeIPAddresses() {
return this.onlyAllowedIPAddresses !== undefined;
}
Expand Down

0 comments on commit 58e6900

Please sign in to comment.