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
+6 -3

No files matched your search

-2
View File
@@ -2,8 +2,6 @@
import { page } from '$app/stores' import { page } from '$app/stores'
import Link from '$lib/components/input/Link.svelte' import Link from '$lib/components/input/Link.svelte'
import MultiSelect from '$lib/components/input/MultiSelect.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 Post from '../../../lib/components/lemmy/Post.svelte'
import { goto } from '$app/navigation' import { goto } from '$app/navigation'
import Card from '$lib/components/ui/StickyCard.svelte' import Card from '$lib/components/ui/StickyCard.svelte'
-1
View File
@@ -9,7 +9,6 @@
import StickyCard from '$lib/components/ui/StickyCard.svelte' import StickyCard from '$lib/components/ui/StickyCard.svelte'
import FormattedNumber from '$lib/components/util/FormattedNumber.svelte' import FormattedNumber from '$lib/components/util/FormattedNumber.svelte'
import RelativeDate from '$lib/components/util/RelativeDate.svelte' import RelativeDate from '$lib/components/util/RelativeDate.svelte'
import { getClient } from '$lib/lemmy.js'
import type { import type {
CommentView, CommentView,
GetPersonDetailsResponse, GetPersonDetailsResponse,
+6
View File
@@ -12,6 +12,12 @@ const config = {
// If your environment is not supported or you settled on a specific environment, switch out the adapter. // 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. // See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter(), adapter: adapter(),
csp: {
directives: {
'script-src': ['self']
},
mode: 'nonce'
}
} }
}; };