MCPcopy
hub / github.com/Effect-TS/effect / removeHost

Function removeHost

packages/platform-bun/src/internal/httpServer.ts:469–475  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

467}
468
469const removeHost = (url: string) => {
470 if (url[0] === "/") {
471 return url
472 }
473 const index = url.indexOf("/", url.indexOf("//") + 2)
474 return index === -1 ? "/" : url.slice(index)
475}
476
477/** @internal */
478export const requestSource = (self: ServerRequest.HttpServerRequest) => (self as ServerRequestImpl).source

Callers 1

handlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected