MCPcopy Create free account
hub / github.com/Effect-TS/effect / removeHost

Function removeHost

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

Source from the content-addressed store, hash-verified

484}
485
486const removeHost = (url: string) => {
487 if (url[0] === "/") {
488 return url
489 }
490 const index = url.indexOf("/", url.indexOf("//") + 2)
491 return index === -1 ? "/" : url.slice(index)
492}
493
494/** @internal */
495export const requestSource = (self: ServerRequest.HttpServerRequest) => (self as ServerRequestImpl).source

Callers 1

handlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected