MCPcopy Create free account
hub / github.com/OpenHands/OpenHands / matchesPathPrefix

Function matchesPathPrefix

scripts/proxy-utils.mjs:11–17  ·  view source on GitHub ↗
(url, prefix)

Source from the content-addressed store, hash-verified

9]);
10
11export function matchesPathPrefix(url, prefix) {
12 return (
13 url === prefix ||
14 url.startsWith(prefix + "/") ||
15 url.startsWith(prefix + "?")
16 );
17}
18
19export function createRouter(routes, defaultBackend = null) {
20 const sortedRoutes = Object.entries(routes).sort(

Callers 2

matchesAnyPrefixFunction · 0.90
createRouterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected