Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
background-color: black;
}
</style>
<script>
<script nonce="%sveltekit.nonce%">
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script might need to be externalized or hashed because the adapter-static prerenders the html.

/**
* Prevent FOUC on page load.
*/
Expand Down
9 changes: 9 additions & 0 deletions web/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ const config = {
$i18n: '../i18n',
'chromecast-caf-sender': './node_modules/@types/chromecast-caf-sender/index.d.ts',
},
csp: {
directives: {
'default-src': ['self'],
'connect-src': ['self', 'blob:', 'https://*.immich.cloud', 'https://*.maptiler.com'], // TODO: check if custom maptiler json works
'img-src': ['self', 'blob:', 'data:'],
'script-src': ['self', 'wasm-unsafe-eval', 'https://*.gstatic.com'],
'worker-src': ['self', 'blob:'],
},
},
},
};

Expand Down
Loading