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

Function parseAllowedHosts

packages/server/src/middleware/hostnames.ts:60–69  ·  view source on GitHub ↗
(env: NodeJS.ProcessEnv = process.env)

Source from the content-addressed store, hash-verified

58 * caller can express domain-suffix wildcards (`.example.com`).
59 */
60export function parseAllowedHosts(env: NodeJS.ProcessEnv = process.env): string[] {
61 const raw = env['KIMI_CODE_ALLOWED_HOSTS'];
62 if (raw === undefined) {
63 return [];
64 }
65 return raw
66 .split(',')
67 .map((entry) => entry.trim())
68 .filter((entry) => entry.length > 0);
69}
70
71/** True when `KIMI_CODE_DISABLE_HOST_CHECK=1` (test/controlled env only). */
72export function isHostCheckDisabled(env: NodeJS.ProcessEnv = process.env): boolean {

Callers 2

hostnames.test.tsFile · 0.90
startServerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected