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

Function stripWww

src/tools/WebFetchTool/utils.ts:236–236  ·  view source on GitHub ↗
(hostname: string)

Source from the content-addressed store, hash-verified

234 // 2. Removing www. is allowed: www.example.com -> example.com
235 // 3. Same host (with or without www.) is allowed: paths can change
236 const stripWww = (hostname: string) => hostname.replace(/^www\./, '')
237 const originalHostWithoutWww = stripWww(parsedOriginal.hostname)
238 const redirectHostWithoutWww = stripWww(parsedRedirect.hostname)
239 return originalHostWithoutWww === redirectHostWithoutWww

Callers 1

isPermittedRedirectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected