Fix sentry config
This commit is contained in:
parent
0be4f5f0c6
commit
bb847974a4
4 changed files with 13 additions and 6 deletions
|
|
@ -1,6 +1,3 @@
|
|||
# This is committed to git
|
||||
# DO NOT STORE SECRETS IN THIS FILE
|
||||
# use .env.local for secrets
|
||||
|
||||
SENTRY_DSN = "https://d006c73cc53783930a1521a68ae1c312@o4507835405369344.ingest.de.sentry.io/4507835410481232"
|
||||
SENTRY_REPORT_URL = "https://o4507835405369344.ingest.de.sentry.io/api/4507835410481232/security/?sentry_key=d006c73cc53783930a1521a68ae1c312"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import { SENTRY_DSN } from '$lib/config';
|
||||
import { init as initSentry, handleErrorWithSentry, makeBrowserOfflineTransport, makeFetchTransport, replayIntegration } from '@sentry/sveltekit';
|
||||
|
||||
initSentry({
|
||||
dsn: import.meta.env.SENTRY_DSN,
|
||||
dsn: SENTRY_DSN,
|
||||
environment: import.meta.env.MODE,
|
||||
tracesSampleRate: 1.0,
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ import { sequence } from '@sveltejs/kit/hooks';
|
|||
import {init as initSentry, handleErrorWithSentry, sentryHandle} from '@sentry/sveltekit';
|
||||
import type { Handle } from "@sveltejs/kit";
|
||||
import { randomBytes } from 'crypto';
|
||||
import { SENTRY_DSN, SENTRY_REPORT_URL } from './lib/config';
|
||||
|
||||
initSentry({
|
||||
dsn: import.meta.env.SENTRY_DSN,
|
||||
dsn: SENTRY_DSN,
|
||||
environment: import.meta.env.MODE,
|
||||
tracesSampleRate: 1
|
||||
})
|
||||
|
|
@ -21,7 +22,7 @@ const securityHeaders = {
|
|||
'Cross-Origin-Opener-Policy': 'same-origin',
|
||||
'Cross-Origin-Resource-Policy': 'same-origin',
|
||||
|
||||
'Report-To': '{"group":"csp-endpoint","max_age":10886400,"endpoints":[{"url":"' + import.meta.env.SENTRY_REPORT_URL + '"}],"include_subdomains":true}',
|
||||
'Report-To': '{"group":"csp-endpoint","max_age":10886400,"endpoints":[{"url":"' + SENTRY_REPORT_URL + '"}],"include_subdomains":true}',
|
||||
}
|
||||
|
||||
export const handle: Handle = async (input) => {
|
||||
|
|
|
|||
8
packages/website/src/lib/config.js
Normal file
8
packages/website/src/lib/config.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|
||||
// Sentry config
|
||||
export const SENTRY_HOST = "o4507835405369344.ingest.de.sentry.io"
|
||||
export const SENTRY_PROJECT_ID = "4507835410481232"
|
||||
export const SENTRY_KEY = "d006c73cc53783930a1521a68ae1c312"
|
||||
export const SENTRY_TUNNEL_ALLOWED_IDS = [SENTRY_PROJECT_ID]
|
||||
export const SENTRY_DSN = "https://" + SENTRY_KEY + "@" + SENTRY_HOST + "/" + SENTRY_PROJECT_ID
|
||||
export const SENTRY_REPORT_URL = "https://" + SENTRY_HOST + "/api/" + SENTRY_PROJECT_ID + "/security/?sentry_key=" + SENTRY_KEY
|
||||
Loading…
Add table
Reference in a new issue