Skip to content

Commit 46a60a6

Browse files
Svelte config: migrate csrf options to newer version
1 parent fa14e6f commit 46a60a6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

svelte.config.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ const config = {
77
// for more information about preprocessors
88
preprocess: vitePreprocess(),
99
compilerOptions: { runes: true },
10+
11+
csrf: {
12+
// Disable origin checking, so that form submission works when using an API client.
13+
// FIXME: This is definitely a security issue, and so I should find a workaround at some point.
14+
trustedOrigins: true,
15+
},
1016

1117
kit: {
1218
// Import aliases
@@ -20,11 +26,6 @@ const config = {
2026
version: {
2127
name: process.env.npm_package_version,
2228
},
23-
// Disable origin checking, so that form submission works when using an API client.
24-
// FIXME: This is definitely a security issue, and so I should find a workaround at some point.
25-
csrf: {
26-
checkOrigin: false,
27-
},
2829
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
2930
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
3031
// See https://kit.svelte.dev/docs/adapters for more information about adapters.

0 commit comments

Comments
 (0)