MCPcopy
hub / github.com/codeaashu/claude-code / isPreapprovedUrl

Function isPreapprovedUrl

src/tools/WebFetchTool/utils.ts:130–137  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

128export const MAX_MARKDOWN_LENGTH = 100_000
129
130export function isPreapprovedUrl(url: string): boolean {
131 try {
132 const parsedUrl = new URL(url)
133 return isPreapprovedHost(parsedUrl.hostname, parsedUrl.pathname)
134 } catch {
135 return false
136 }
137}
138
139export function validateURL(url: string): boolean {
140 if (url.length > MAX_URL_LENGTH) {

Callers 1

callFunction · 0.85

Calls 1

isPreapprovedHostFunction · 0.85

Tested by

no test coverage detected