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

Function getMaybeProxiedCodeServer

test/utils/helpers.ts:116–124  ·  view source on GitHub ↗
(codeServer: CodeServerPage | CodeServer)

Source from the content-addressed store, hash-verified

114 * Otherwise, return the direct address of code-server.
115 */
116export async function getMaybeProxiedCodeServer(codeServer: CodeServerPage | CodeServer): Promise<string> {
117 const address = await codeServer.address()
118 if (process.env.USE_PROXY === "1") {
119 const uri = new URL(address)
120 return `http://${uri.hostname}:${REVERSE_PROXY_PORT}/${uri.port}/${REVERSE_PROXY_BASE_PATH}/`
121 }
122
123 return address
124}
125
126/**
127 * Stripes proxy base from url.pathname

Callers 4

terminal.test.tsFile · 0.90
codeServer.test.tsFile · 0.90
runTestExtensionTestsFunction · 0.90
navigateMethod · 0.90

Calls 1

addressMethod · 0.45

Tested by 1

runTestExtensionTestsFunction · 0.72