MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / defaultServerOrigin

Function defaultServerOrigin

apps/kimi-web/src/api/config.ts:36–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34// Set VITE_KIMI_SERVER_HTTP_URL to connect directly to an absolute server
35// origin instead (that path does require the server to send CORS headers).
36function defaultServerOrigin(): string {
37 if (typeof window !== 'undefined' && window.location?.origin) {
38 return window.location.origin;
39 }
40 return 'http://127.0.0.1:58627';
41}
42
43export function normalizeServerOrigin(value: string | undefined): string {
44 const raw = value && value.trim() ? value : defaultServerOrigin();

Callers 1

normalizeServerOriginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected