MCPcopy
hub / github.com/vitejs/vite / doesProxyContextMatchUrl

Function doesProxyContextMatchUrl

packages/vite/src/node/server/middlewares/proxy.ts:231–236  ·  view source on GitHub ↗
(context: string, url: string)

Source from the content-addressed store, hash-verified

229}
230
231function doesProxyContextMatchUrl(context: string, url: string): boolean {
232 return (
233 (context[0] === '^' && new RegExp(context).test(url)) ||
234 url.startsWith(context)
235 )
236}

Callers 1

proxyMiddlewareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected