Skip to content

Commit

Permalink
Add CSP
Browse files Browse the repository at this point in the history
  • Loading branch information
VaiTon committed Feb 20, 2024
1 parent 8b33a1f commit 49af1a4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,20 @@ 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', 'https://va.vercel-scripts.com/'],
'img-src': [
'self',
'data:',
'https://*.openfoodfacts.org/',
'https://tile.openstreetmap.org'
],
'style-src': ['self', 'unsafe-inline'],
'frame-ancestors': ['none']
}
}
}
};

Expand Down

0 comments on commit 49af1a4

Please sign in to comment.