MCPcopy Create free account
hub / github.com/Noumena-Network/code / oauthWebSocketBaseUrl

Function oauthWebSocketBaseUrl

src/utils/platformUrls.test.ts:17–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17function oauthWebSocketBaseUrl(): string {
18 const baseUrl = oauthBaseApiUrl()
19 if (baseUrl.startsWith('https://')) {
20 return `wss://${baseUrl.slice('https://'.length)}`
21 }
22 if (baseUrl.startsWith('http://')) {
23 return `ws://${baseUrl.slice('http://'.length)}`
24 }
25 return baseUrl
26}
27
28function resetEnv() {
29 delete process.env.NOUMENA_PLATFORM_BASE_URL

Callers 1

Calls 1

oauthBaseApiUrlFunction · 0.85

Tested by

no test coverage detected