50 lines
1.6 KiB
JavaScript
50 lines
1.6 KiB
JavaScript
// import adapter from '@sveltejs/adapter-auto';
|
|
import adapter from '@sveltejs/adapter-node';
|
|
// import adapter from '@sveltejs/adapter-netlify';
|
|
import preprocess from 'svelte-preprocess';
|
|
import { mdsvex } from 'mdsvex'
|
|
|
|
/** @type {import('@sveltejs/kit').Config} */
|
|
const config = {
|
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
|
// for more information about preprocessors
|
|
preprocess: [
|
|
preprocess(),
|
|
mdsvex({
|
|
extensions: ['.md']
|
|
})
|
|
],
|
|
|
|
kit: {
|
|
csrf: {
|
|
trustedOrigins: ['http://88.99.191.191', 'https://floter.design'] // Add your production domain when you have one
|
|
},
|
|
adapter: adapter({
|
|
// Output directory for the built server
|
|
out: 'build',
|
|
// Precompress output files (gzip and brotli)
|
|
precompress: true,
|
|
// Enable polyfills for Node.js built-in modules
|
|
polyfills: true
|
|
}),
|
|
csp: {
|
|
mode: 'auto',
|
|
directives: {
|
|
'default-src': ['self'],
|
|
'img-src': ['self', '*.cloudinary.com', 'data:'],
|
|
'media-src': ['self', '*.cloudinary.com'],
|
|
'style-src': ['self', 'unsafe-inline', '*.typekit.net'],
|
|
"font-src": ['self', '*.typekit.net'],
|
|
'script-src': ['self', 'unsafe-eval', 'unsafe-inline', 'https://analytics.floter.design'],
|
|
'connect-src': ['self', 'https://analytics.floter.design'],
|
|
// "upgrade-insecure-requests": true // Disabled for HTTP/IP access - enable when using HTTPS
|
|
},
|
|
},
|
|
// prerender: {
|
|
// force: true
|
|
// }
|
|
},
|
|
extensions: ['.svelte', '.md']
|
|
};
|
|
|
|
export default config;
|