diff --git a/crates/hypercolor-app/tauri.conf.json b/crates/hypercolor-app/tauri.conf.json index 5236f7fd9..21ea5a273 100644 --- a/crates/hypercolor-app/tauri.conf.json +++ b/crates/hypercolor-app/tauri.conf.json @@ -9,7 +9,7 @@ "windows": [], "withGlobalTauri": true, "security": { - "csp": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; connect-src 'self' ipc: http://ipc.localhost http: https: ws: wss:; img-src 'self' data: blob: http: https:; media-src 'self' data: blob: http: https:; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.bunny.net; font-src 'self' data: https://fonts.bunny.net; object-src 'none'; base-uri 'none'; frame-src 'none'; frame-ancestors 'none'; form-action 'none'" + "csp": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; connect-src 'self' ipc: http://ipc.localhost http: https: ws: wss:; img-src 'self' data: blob: http: https:; media-src 'self' data: blob: http: https:; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.bunny.net https://api.fontshare.com; font-src 'self' data: https://fonts.bunny.net https://cdn.fontshare.com; object-src 'none'; base-uri 'none'; frame-src 'none'; frame-ancestors 'none'; form-action 'none'" } }, "bundle": { diff --git a/crates/hypercolor-app/tauri.macos.conf.json b/crates/hypercolor-app/tauri.macos.conf.json index a4fb6dc02..bf35becd8 100644 --- a/crates/hypercolor-app/tauri.macos.conf.json +++ b/crates/hypercolor-app/tauri.macos.conf.json @@ -1,7 +1,7 @@ { "app": { "security": { - "csp": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; connect-src 'self' ipc: http://ipc.localhost http://127.0.0.1:* http://localhost:* http://[::1]:* https://127.0.0.1:* https://localhost:* https://[::1]:* ws://127.0.0.1:* ws://localhost:* ws://[::1]:* wss://127.0.0.1:* wss://localhost:* wss://[::1]:*; img-src 'self' data: blob: http://127.0.0.1:* http://localhost:* http://[::1]:* https://127.0.0.1:* https://localhost:* https://[::1]:*; media-src 'self' data: blob: http://127.0.0.1:* http://localhost:* http://[::1]:* https://127.0.0.1:* https://localhost:* https://[::1]:*; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.bunny.net; font-src 'self' data: https://fonts.bunny.net; object-src 'none'; base-uri 'none'; frame-src 'none'; frame-ancestors 'none'; form-action 'none'" + "csp": "default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; connect-src 'self' ipc: http://ipc.localhost http://127.0.0.1:* http://localhost:* http://[::1]:* https://127.0.0.1:* https://localhost:* https://[::1]:* ws://127.0.0.1:* ws://localhost:* ws://[::1]:* wss://127.0.0.1:* wss://localhost:* wss://[::1]:*; img-src 'self' data: blob: http://127.0.0.1:* http://localhost:* http://[::1]:* https://127.0.0.1:* https://localhost:* https://[::1]:*; media-src 'self' data: blob: http://127.0.0.1:* http://localhost:* http://[::1]:* https://127.0.0.1:* https://localhost:* https://[::1]:*; worker-src 'self' blob:; style-src 'self' 'unsafe-inline' https://fonts.bunny.net https://api.fontshare.com; font-src 'self' data: https://fonts.bunny.net https://cdn.fontshare.com; object-src 'none'; base-uri 'none'; frame-src 'none'; frame-ancestors 'none'; form-action 'none'" } } } diff --git a/crates/hypercolor-app/tests/packaging_tests.rs b/crates/hypercolor-app/tests/packaging_tests.rs index b138f56cf..0f6391696 100644 --- a/crates/hypercolor-app/tests/packaging_tests.rs +++ b/crates/hypercolor-app/tests/packaging_tests.rs @@ -236,11 +236,21 @@ fn bundled_origin_csp_is_exact_and_macos_network_access_is_loopback_only() { assert_eq!(directives["worker-src"], csp_sources(&["'self'", "blob:"])); assert_eq!( directives["style-src"], - csp_sources(&["'self'", "'unsafe-inline'", "https://fonts.bunny.net"]) + csp_sources(&[ + "'self'", + "'unsafe-inline'", + "https://fonts.bunny.net", + "https://api.fontshare.com" + ]) ); assert_eq!( directives["font-src"], - csp_sources(&["'self'", "data:", "https://fonts.bunny.net"]) + csp_sources(&[ + "'self'", + "data:", + "https://fonts.bunny.net", + "https://cdn.fontshare.com" + ]) ); for denied in [ "object-src", diff --git a/crates/hypercolor-ui/index.html b/crates/hypercolor-ui/index.html index 04692b06d..b8f53ecc6 100644 --- a/crates/hypercolor-ui/index.html +++ b/crates/hypercolor-ui/index.html @@ -30,7 +30,10 @@ - + + + +