Skip to content

Commit 76d2d4f

Browse files
committed
fix(csp): allow kapa metrics script and Google favicon images
kapa.ai loads an analytics script from metrics.kapa.ai and uses Google's favicon API (www.google.com/s2/favicons) for search result icons. Both were blocked by the Content-Security-Policy. - Add https://metrics.kapa.ai to script-src - Add https://www.google.com to img-src
1 parent a259e3b commit 76d2d4f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎public/.ic-assets.json5‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// plugins such as Form Analytics or Heatmaps that call eval() internally).
1313
// Better long-term fix: disable those plugins in the Matomo Cloud dashboard
1414
// so the bundled matomo.js no longer needs eval(), then remove 'unsafe-eval'.
15-
"Content-Security-Policy": "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval' https://cdn.matomo.cloud https://widget.kapa.ai https://hcaptcha.com https://*.hcaptcha.com; style-src 'self' 'unsafe-inline' https://hcaptcha.com https://*.hcaptcha.com; img-src 'self' data: https://www.plantuml.com https://widget.kapa.ai; font-src 'self' data:; connect-src 'self' https://icp0.io https://*.icp0.io https://internetcomputer.matomo.cloud https://proxy.kapa.ai https://metrics.kapa.ai https://kapa-widget-proxy-la7dkmplpq-uc.a.run.app https://hcaptcha.com https://*.hcaptcha.com; frame-src https://hcaptcha.com https://*.hcaptcha.com; frame-ancestors 'none'; form-action 'self'; base-uri 'self'; upgrade-insecure-requests",
15+
"Content-Security-Policy": "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval' https://cdn.matomo.cloud https://widget.kapa.ai https://metrics.kapa.ai https://hcaptcha.com https://*.hcaptcha.com; style-src 'self' 'unsafe-inline' https://hcaptcha.com https://*.hcaptcha.com; img-src 'self' data: https://www.plantuml.com https://widget.kapa.ai https://www.google.com; font-src 'self' data:; connect-src 'self' https://icp0.io https://*.icp0.io https://internetcomputer.matomo.cloud https://proxy.kapa.ai https://metrics.kapa.ai https://kapa-widget-proxy-la7dkmplpq-uc.a.run.app https://hcaptcha.com https://*.hcaptcha.com; frame-src https://hcaptcha.com https://*.hcaptcha.com; frame-ancestors 'none'; form-action 'self'; base-uri 'self'; upgrade-insecure-requests",
1616
"X-Content-Type-Options": "nosniff",
1717
"Referrer-Policy": "strict-origin-when-cross-origin",
1818
"Permissions-Policy": "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()"

0 commit comments

Comments
 (0)