diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-11-22 13:58:27 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-11-22 13:58:27 +0000 |
| commit | 67b8a3c141e537571c9cda58265b261ff35ed385 (patch) | |
| tree | 9da12dcb053a53e72e75957487160672c03500ba /apps | |
| parent | 3345377dd09f4234c82e814dfaa310f69fa48386 (diff) | |
| download | karakeep-67b8a3c141e537571c9cda58265b261ff35ed385.tar.zst | |
fix: add a way to allowlist all domains from ip validation
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/workers/network.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/workers/network.ts b/apps/workers/network.ts index d1cda62c..0dc46da4 100644 --- a/apps/workers/network.ts +++ b/apps/workers/network.ts @@ -95,6 +95,10 @@ function hostnameMatchesAnyPattern( patterns: string[], ): boolean { function hostnameMatchesPattern(hostname: string, pattern: string): boolean { + if (pattern === ".") { + return true; + } + return ( pattern === hostname || (pattern.startsWith(".") && hostname.endsWith(pattern)) || |
