Adds Sentry and Umami monitoring to the site
Continuous Integration / lighthouse (pull_request) Canceled after 0s
Continuous Integration / deploy-test (pull_request) Canceled after 0s
Continuous Integration / deploy-production (pull_request) Canceled after 0s
Continuous Integration / check (pull_request) Canceled after 2m22s
Continuous Integration / lighthouse (pull_request) Canceled after 0s
Continuous Integration / deploy-test (pull_request) Canceled after 0s
Continuous Integration / deploy-production (pull_request) Canceled after 0s
Continuous Integration / check (pull_request) Canceled after 2m22s
Sentry loads after the page and reports errors only, without personal data; Umami counts visits per environment. Both only run on andreaslop.nl and test.andreaslop.nl. The CSP allows just these two hosts, and builds carry the commit SHA as release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
// HTTP-securityheaders voor de Vite dev- en preview-server. De productieset is
|
||||
// ook het voorschrift voor de toekomstige host (zie NFR-SEC-01/02).
|
||||
|
||||
import { sentryIngestOrigin, umamiOrigin } from '../src/monitoring/config.ts';
|
||||
|
||||
type Mode = 'production' | 'development';
|
||||
|
||||
// Chakra/Emotion zetten tijdens runtime <style>-tags in de pagina, daarom
|
||||
// staat style-src 'unsafe-inline' toe. Scripts komen alleen van de eigen site.
|
||||
// staat style-src 'unsafe-inline' toe. Scripts komen van de eigen site en het
|
||||
// Umami-script; verbindingen alleen naar Umami en Sentry (monitoring-plan M7).
|
||||
const productionCsp: Record<string, string[]> = {
|
||||
'default-src': ["'self'"],
|
||||
'script-src': ["'self'"],
|
||||
'script-src': ["'self'", umamiOrigin],
|
||||
'style-src': ["'self'", "'unsafe-inline'"],
|
||||
'img-src': ["'self'", 'data:'],
|
||||
'font-src': ["'self'"],
|
||||
'connect-src': ["'self'"],
|
||||
'connect-src': ["'self'", umamiOrigin, sentryIngestOrigin],
|
||||
'object-src': ["'none'"],
|
||||
'base-uri': ["'self'"],
|
||||
'form-action': ["'self'"],
|
||||
|
||||
Reference in New Issue
Block a user