Add Sentry Relay

This commit is contained in:
Jade Ellis
2024-09-03 02:09:16 +01:00
parent f1d36e2a89
commit 392f7c88c1
3 changed files with 43 additions and 3 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
const rootDomain = process.env.VITE_DOMAIN; // or your server IP for dev
import { SENTRY_HOST } from './src/lib/config.js';
import { SENTRY_REPORT_URL } from './src/lib/config.js';
/**
* @type {import("@sveltejs/kit").CspDirectives}
@@ -7,7 +7,7 @@ import { SENTRY_REPORT_URL } from './src/lib/config.js';
const cspDirectives = {
'base-uri': ["'self'"],
'child-src': ["'self'", "blob:"],
'connect-src': ["'self'", "https://*.google-analytics.com", "https://*.sentry.io"],
'connect-src': ["'self'", "https://*.google-analytics.com", "https://" + SENTRY_HOST],
// 'connect-src': ["'self'", 'ws://localhost:*', 'https://hcaptcha.com', 'https://*.hcaptcha.com'],
'img-src': ["'self'", 'data:',
'https://*.googletagmanager.com'],