Fix cast sentry
This commit is contained in:
parent
3db2673d2a
commit
bd345c9583
14 changed files with 24 additions and 93 deletions
|
@ -1,3 +1,3 @@
|
|||
import { initSentry } from '@ente/shared/sentry/config/sentry.config.base';
|
||||
|
||||
initSentry('https://bd3656fc40d74d5e8f278132817963a3@sentry.ente.io/2');
|
||||
initSentry('https://cbed7333f2810fbbdb692dcd76d8ca1a@sentry.ente.io/2');
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
defaults.url=https://sentry.ente.io/
|
||||
defaults.org=ente
|
||||
defaults.project=photos-web
|
||||
# This file is used by the SentryWebpackPlugin to upload sourcemaps when the
|
||||
# SENTRY_AUTH_TOKEN environment variable is defined.
|
||||
|
||||
defaults.url = https://sentry.ente.io/
|
||||
defaults.org = ente
|
||||
defaults.project = photos-web
|
||||
|
|
0
apps/auth/sentry.edge.config.ts
Normal file
0
apps/auth/sentry.edge.config.ts
Normal file
|
@ -1,3 +1,6 @@
|
|||
defaults.url=https://sentry.ente.io/
|
||||
defaults.org=ente
|
||||
defaults.project=auth-web
|
||||
# This file is used by the SentryWebpackPlugin to upload sourcemaps when the
|
||||
# SENTRY_AUTH_TOKEN environment variable is defined.
|
||||
|
||||
defaults.url = https://sentry.ente.io/
|
||||
defaults.org = ente
|
||||
defaults.project = auth-web
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
const cp = require('child_process');
|
||||
const { getIsSentryEnabled } = require('./sentryConfigUtil');
|
||||
|
||||
module.exports = {
|
||||
WEB_SECURITY_HEADERS: {
|
||||
'Strict-Transport-Security': ' max-age=63072000',
|
||||
'X-Content-Type-Options': 'nosniff',
|
||||
'X-Download-Options': 'noopen',
|
||||
'X-Frame-Options': 'deny',
|
||||
'X-XSS-Protection': '1; mode=block',
|
||||
'Referrer-Policy': 'same-origin',
|
||||
},
|
||||
|
||||
CSP_DIRECTIVES: {
|
||||
// self is safe enough
|
||||
'default-src': "'self'",
|
||||
// data to allow two factor qr code
|
||||
'img-src': "'self' blob: data: https://*.openstreetmap.org",
|
||||
'media-src': "'self' blob:",
|
||||
'manifest-src': "'self'",
|
||||
'style-src': "'self' 'unsafe-inline'",
|
||||
'font-src ': "'self'; script-src 'self' 'unsafe-eval' blob:",
|
||||
'connect-src':
|
||||
"'self' https://*.ente.io http://localhost:8080 data: blob: https://ente-prod-eu.s3.eu-central-003.backblazeb2.com https://ente-prod-v3.s3.eu-central-2.wasabisys.com/ https://ente-staging-eu.s3.eu-central-003.backblazeb2.com/ ws://localhost:3000/",
|
||||
'base-uri ': "'self'",
|
||||
// to allow worker
|
||||
'child-src': "'self' blob:",
|
||||
'object-src': "'none'",
|
||||
'frame-ancestors': " 'none'",
|
||||
'form-action': "'none'",
|
||||
'report-uri': ' https://csp-reporter.ente.io/local',
|
||||
'report-to': ' https://csp-reporter.ente.io/local',
|
||||
'script-src-elem': "'self' https://www.gstatic.com",
|
||||
},
|
||||
|
||||
ALL_ROUTES: '/(.*)',
|
||||
|
||||
buildCSPHeader: (directives) => ({
|
||||
'Content-Security-Policy-Report-Only': Object.entries(
|
||||
directives
|
||||
).reduce((acc, [key, value]) => acc + `${key} ${value};`, ''),
|
||||
}),
|
||||
|
||||
convertToNextHeaderFormat: (headers) =>
|
||||
Object.entries(headers).map(([key, value]) => ({ key, value })),
|
||||
|
||||
getGitSha: () =>
|
||||
cp.execSync('git rev-parse --short HEAD', {
|
||||
cwd: __dirname,
|
||||
encoding: 'utf8',
|
||||
}),
|
||||
getIsSentryEnabled: getIsSentryEnabled,
|
||||
};
|
|
@ -1,2 +0,0 @@
|
|||
import { setupSentry } from '@ente/shared/sentry/config/sentry.config.base';
|
||||
setupSentry('https://bd3656fc40d74d5e8f278132817963a3@sentry.ente.io/2');
|
3
apps/cast/sentry.client.config.ts
Normal file
3
apps/cast/sentry.client.config.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
import { initSentry } from '@ente/shared/sentry/config/sentry.config.base';
|
||||
|
||||
initSentry('https://cbed7333f2810fbbdb692dcd76d8ca1a@sentry.ente.io/2');
|
0
apps/cast/sentry.edge.config.ts
Normal file
0
apps/cast/sentry.edge.config.ts
Normal file
|
@ -1,3 +1,6 @@
|
|||
defaults.url=https://sentry.ente.io/
|
||||
defaults.org=ente
|
||||
defaults.project=photos-web
|
||||
# This file is used by the SentryWebpackPlugin to upload sourcemaps when the
|
||||
# SENTRY_AUTH_TOKEN environment variable is defined.
|
||||
|
||||
defaults.url = https://sentry.ente.io/
|
||||
defaults.org = ente
|
||||
defaults.project = photos-web
|
||||
|
|
0
apps/cast/sentry.server.config.ts
Normal file
0
apps/cast/sentry.server.config.ts
Normal file
|
@ -1,11 +0,0 @@
|
|||
const ENV_DEVELOPMENT = 'development';
|
||||
|
||||
module.exports.getIsSentryEnabled = () => {
|
||||
if (process.env.NEXT_PUBLIC_SENTRY_ENV === ENV_DEVELOPMENT) {
|
||||
return false;
|
||||
} else if (process.env.NEXT_PUBLIC_DISABLE_SENTRY === 'true') {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
};
|
|
@ -1,15 +0,0 @@
|
|||
export const ENV_DEVELOPMENT = 'development';
|
||||
export const ENV_PRODUCTION = 'production';
|
||||
|
||||
export const getSentryDSN = () =>
|
||||
process.env.NEXT_PUBLIC_SENTRY_DSN ??
|
||||
'https://bd3656fc40d74d5e8f278132817963a3@sentry.ente.io/2';
|
||||
|
||||
export const getSentryENV = () =>
|
||||
process.env.NEXT_PUBLIC_SENTRY_ENV ?? ENV_PRODUCTION;
|
||||
|
||||
export const getSentryRelease = () => process.env.SENTRY_RELEASE;
|
||||
|
||||
export { getIsSentryEnabled } from '../../sentryConfigUtil';
|
||||
|
||||
export const isDEVSentryENV = () => getSentryENV() === ENV_DEVELOPMENT;
|
|
@ -1,5 +1,5 @@
|
|||
# This file is used by the SentryWebpackPlugin to upload sourcemaps (if the
|
||||
# SENTRY_AUTH_TOKEN environment variable is defined).
|
||||
# This file is used by the SentryWebpackPlugin to upload sourcemaps when the
|
||||
# SENTRY_AUTH_TOKEN environment variable is defined.
|
||||
|
||||
defaults.url = https://sentry.ente.io/
|
||||
defaults.org = ente
|
||||
|
|
Loading…
Add table
Reference in a new issue