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

Function parseCorsOrigins

packages/server/src/middleware/origin.ts:39–48  ·  view source on GitHub ↗
(env: NodeJS.ProcessEnv = process.env)

Source from the content-addressed store, hash-verified

37 * an explicit origin (PLAN §3.4).
38 */
39export function parseCorsOrigins(env: NodeJS.ProcessEnv = process.env): string[] {
40 const raw = env['KIMI_CODE_CORS_ORIGINS'];
41 if (raw === undefined) {
42 return [];
43 }
44 return raw
45 .split(',')
46 .map((entry) => entry.trim())
47 .filter((entry) => entry.length > 0);
48}
49
50/**
51 * Return the `host` (host[:port], default port dropped) of an `Origin` value,

Callers 2

origin.test.tsFile · 0.90
startServerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected