import adapter from '@sveltejs/adapter-node'; /** @type {import('@sveltejs/kit').Config} */ const config = { kit: { adapter: adapter({ // Trust X-Forwarded-Proto / X-Forwarded-For from the nginx-ingress. // Required so that `url.protocol` and client IP are correct behind the proxy. trustProxy: true, }), // Disable SvelteKit's built-in single-origin CSRF check — we handle it // ourselves in hooks.server.ts with a multi-origin allowlist. csrf: { checkOrigin: false, }, }, vitePlugin: { dynamicCompileOptions: ({ filename }) => filename.includes('node_modules') ? undefined : { runes: true } } }; export default config;