(host: string)
| 49 | }); |
| 50 | |
| 51 | async 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 | |
| 70 | describe('security response headers (M6.6)', () => { |
| 71 | it('sets nosniff / Referrer-Policy / CSP on a non-loopback bind, without HSTS', async () => { |
no test coverage detected