feat: Add CSP

This commit is contained in:
Xyphyn committed 2023-07-10 09:18:42 -07:00
1 parent d34e58d809
commit 429bad2fec
3 files changed
+7 -4

No files matched your search

-2
View File
@@ -2,8 +2,6 @@
import { page } from '$app/stores'
import Link from '$lib/components/input/Link.svelte'
import MultiSelect from '$lib/components/input/MultiSelect.svelte'
import SvelteMarkdown from 'svelte-markdown'
import Avatar from '../../../lib/components/ui/Avatar.svelte'
import Post from '../../../lib/components/lemmy/Post.svelte'
import { goto } from '$app/navigation'
import Card from '$lib/components/ui/StickyCard.svelte'
-1
View File
@@ -9,7 +9,6 @@
import StickyCard from '$lib/components/ui/StickyCard.svelte'
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
import RelativeDate from '$lib/components/util/RelativeDate.svelte'
import { getClient } from '$lib/lemmy.js'
import type {
CommentView,
GetPersonDetailsResponse,
+7 -1
View File
@@ -11,7 +11,13 @@ const config = {
// 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(),
adapter: adapter(),
csp: {
directives: {
'script-src': ['self']
},
mode: 'nonce'
}
}
};