MCPcopy Create free account
hub / github.com/codeaashu/claude-code / urlMatchesPattern

Function urlMatchesPattern

src/services/mcp/config.ts:331–334  ·  view source on GitHub ↗

* Check if a URL matches a pattern with wildcard support

(url: string, pattern: string)

Source from the content-addressed store, hash-verified

329 * Check if a URL matches a pattern with wildcard support
330 */
331function urlMatchesPattern(url: string, pattern: string): boolean {
332 const regex = urlPatternToRegex(pattern)
333 return regex.test(url)
334}
335
336/**
337 * Get the settings to use for MCP server allowlist policy.

Callers 2

isMcpServerDeniedFunction · 0.70

Calls 1

urlPatternToRegexFunction · 0.85

Tested by

no test coverage detected