Some checks failed
Test and deploy staging / staging (push) Failing after 5m29s
28 lines
1.1 KiB
JavaScript
Executable File
28 lines
1.1 KiB
JavaScript
Executable File
import adapter from '@sveltejs/adapter-node';
|
|
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
|
// for more information about preprocessors
|
|
preprocess: vitePreprocess(),
|
|
|
|
kit: {
|
|
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
|
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
|
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
|
adapter: adapter(),
|
|
csrf: {
|
|
// vite dev has no way to trust X-Forwarded-Proto, so it thinks every
|
|
// request is http:// even though Caddy terminates TLS in front of it,
|
|
// causing a scheme mismatch against the browser's https Origin header.
|
|
// The built adapter-node server (production) handles this correctly via
|
|
// ORIGIN/PROTOCOL_HEADER, so only relax the check in dev.
|
|
// checkOrigin: process.env.NODE_ENV === 'production',
|
|
trustedOrigins: ['https://dev.stanrunge.dev']
|
|
}
|
|
}
|
|
};
|
|
|
|
export default config;
|