sentry, hooks, CSP update
This commit is contained in:
parent
f6a2a7558e
commit
15e7a32263
|
@ -12,7 +12,7 @@ export const rootDomain = PUBLIC_DOMAIN; // or your server IP for dev
|
||||||
|
|
||||||
const directives = {
|
const directives = {
|
||||||
'base-uri': ["'self'"],
|
'base-uri': ["'self'"],
|
||||||
'child-src': ["'self'"],
|
'child-src': ["'self'", 'blob:'],
|
||||||
// 'connect-src': ["'self'", 'ws://localhost:*'],
|
// 'connect-src': ["'self'", 'ws://localhost:*'],
|
||||||
'connect-src': [
|
'connect-src': [
|
||||||
"'self'",
|
"'self'",
|
||||||
|
|
|
@ -25,7 +25,7 @@ export const cspHandle: Handle = async ({ event, resolve }) => {
|
||||||
const headers = {
|
const headers = {
|
||||||
'X-Frame-Options': 'SAMEORIGIN',
|
'X-Frame-Options': 'SAMEORIGIN',
|
||||||
'Referrer-Policy': 'no-referrer',
|
'Referrer-Policy': 'no-referrer',
|
||||||
'Permissions-Policy': `accelerometer=(), autoplay=(), camera=(), document-domain=(), encrypted-media=(), fullscreen=(self ${rootDomain}), gyroscope=(), interest-cohort=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), sync-xhr=(), usb=(), xr-spatial-tracking=(), geolocation=()`,
|
'Permissions-Policy': `accelerometer=(), autoplay=(), camera=(), document-domain=(self, 'js-profiling'), encrypted-media=(), fullscreen=(self ${rootDomain}), gyroscope=(), interest-cohort=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), sync-xhr=(), usb=(), xr-spatial-tracking=(), geolocation=()`,
|
||||||
'X-Content-Type-Options': 'nosniff',
|
'X-Content-Type-Options': 'nosniff',
|
||||||
// 'Content-Security-Policy-Report-Only': csp,
|
// 'Content-Security-Policy-Report-Only': csp,
|
||||||
'Content-Security-Policy': csp,
|
'Content-Security-Policy': csp,
|
||||||
|
|
|
@ -12,15 +12,23 @@ export default defineConfig({
|
||||||
envPrefix: "PUBLIC_",
|
envPrefix: "PUBLIC_",
|
||||||
plugins: [sentrySvelteKit({
|
plugins: [sentrySvelteKit({
|
||||||
sourceMapsUploadOptions: {
|
sourceMapsUploadOptions: {
|
||||||
org: "none-b0c3fadae",
|
org: "mattmor",
|
||||||
project: "javascript-sveltekit"
|
project: "kkosmetickysalon",
|
||||||
|
|
||||||
|
//telemetry off
|
||||||
|
telemetry: false,
|
||||||
}
|
}
|
||||||
}), sveltekit(), purgeCss({
|
}),
|
||||||
|
sveltekit(),
|
||||||
|
purgeCss({
|
||||||
safelist: {
|
safelist: {
|
||||||
// any selectors that begin with "hljs-" will not be purged
|
// any selectors that begin with "hljs-" will not be purged
|
||||||
greedy: [/^hljs-/],
|
greedy: [/^hljs-/],
|
||||||
},
|
},
|
||||||
})],
|
})],
|
||||||
|
define: {
|
||||||
|
'process.env.VITE_BUILD_TIME': JSON.stringify(new Date().toISOString()),
|
||||||
|
},
|
||||||
test: {
|
test: {
|
||||||
include: ['src/**/*.{test,spec}.{js,ts}']
|
include: ['src/**/*.{test,spec}.{js,ts}']
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue