mirror of
https://github.com/immich-app/immich.git
synced 2026-01-25 19:04:42 -08:00
feat(web): add content security policy (CSP)
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
background-color: black;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
<script nonce="%sveltekit.nonce%">
|
||||
/**
|
||||
* Prevent FOUC on page load.
|
||||
*/
|
||||
|
||||
@@ -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:'],
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user