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

Function boot

packages/server/test/security-headers.test.ts:51–68  ·  view source on GitHub ↗
(host: string)

Source from the content-addressed store, hash-verified

49});
50
51async function boot(host: string): Promise<RunningServer> {
52 const { lockPath, homeDir } = tmpPaths();
53 if (host !== '127.0.0.1') {
54 // Non-loopback binds require a password + TLS opt-out (M6.3).
55 process.env['KIMI_CODE_PASSWORD'] = 'test-pw';
56 }
57 const server = await startServer({
58 serviceOverrides: [fixedTokenAuth()],
59 host,
60 port: 0,
61 lockPath,
62 insecureNoTls: host !== '127.0.0.1',
63 logger: pino({ level: 'silent' }),
64 coreProcessOptions: { homeDir },
65 });
66 running.push(server);
67 return server;
68}
69
70describe('security response headers (M6.6)', () => {
71 it('sets nosniff / Referrer-Policy / CSP on a non-loopback bind, without HSTS', async () => {

Callers 1

Calls 4

startServerFunction · 0.90
fixedTokenAuthFunction · 0.90
tmpPathsFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected