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

Function matchesPathPrefix

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

Source from the content-addressed store, hash-verified

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

Callers 2

matchesAnyPrefixFunction · 0.90
createRouterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected