mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 00:41:25 +00:00
revert(tools): undo accidental merge of PR #18584
This commit is contained in:
@@ -33,7 +33,7 @@ function normalizeHostnameSet(values?: string[]): Set<string> {
|
||||
return new Set(values.map((value) => normalizeHostname(value)).filter(Boolean));
|
||||
}
|
||||
|
||||
export function normalizeHostnameAllowlist(values?: string[]): string[] {
|
||||
function normalizeHostnameAllowlist(values?: string[]): string[] {
|
||||
if (!values || values.length === 0) {
|
||||
return [];
|
||||
}
|
||||
@@ -57,7 +57,7 @@ function isHostnameAllowedByPattern(hostname: string, pattern: string): boolean
|
||||
return hostname === pattern;
|
||||
}
|
||||
|
||||
export function matchesHostnameAllowlist(hostname: string, allowlist: string[]): boolean {
|
||||
function matchesHostnameAllowlist(hostname: string, allowlist: string[]): boolean {
|
||||
if (allowlist.length === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user