(url: string | undefined)
| 72 | * validated after resolution at execution time. |
| 73 | */ |
| 74 | export function isMcpDomainAllowed(url: string | undefined): boolean { |
| 75 | if (!url) { |
| 76 | return getAllowedMcpDomainsFromEnv() === null |
| 77 | } |
| 78 | if (hasEnvVarInHostname(url)) return true |
| 79 | return checkMcpDomain(url) === null |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Throws McpDomainNotAllowedError if the URL's domain is not in the allowlist. |
no test coverage detected