MCPcopy Index your code
hub / github.com/coder/code-server / getMaybeProxiedPathname

Function getMaybeProxiedPathname

test/utils/helpers.ts:130–138  ·  view source on GitHub ↗
(url: URL)

Source from the content-addressed store, hash-verified

128 * i.e. /<port>/ide + route returns just route
129 */
130export function getMaybeProxiedPathname(url: URL): string {
131 if (process.env.USE_PROXY === "1") {
132 // Behind proxy, path will be /<port>/ide + route
133 const pathWithoutProxy = url.pathname.split(`/${REVERSE_PROXY_BASE_PATH}`)[1]
134 return pathWithoutProxy
135 }
136
137 return url.pathname
138}
139
140interface FakeVscodeSockets {
141 /* If called, closes all servers after the first connection. */

Callers 2

helpers.test.tsFile · 0.90
routes.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected