@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url';
55import path from 'node:path' ;
66import dotenv from 'dotenv' ;
77import proxy from './server/app.js' ;
8- import envPlugin from " ./server/config/env.js" ;
8+ import envPlugin from ' ./server/config/env.js' ;
99import { copyFileSync } from 'node:fs' ;
1010import * as Sentry from '@sentry/node' ;
1111
@@ -27,9 +27,7 @@ const isLocalDev = process.argv.includes('--local-dev');
2727
2828const __filename = fileURLToPath ( import . meta. url ) ;
2929const __dirname = path . dirname ( __filename ) ;
30- const frontendConfigLocation = isLocalDev
31- ? 'public/frontend-config.json'
32- : 'dist/client/frontend-config.json' ;
30+ const frontendConfigLocation = isLocalDev ? 'public/frontend-config.json' : 'dist/client/frontend-config.json' ;
3331
3432if ( process . env . FRONTEND_CONFIG_PATH !== undefined && process . env . FRONTEND_CONFIG_PATH . length > 0 ) {
3533 console . log ( 'FRONTEND_CONFIG_PATH is specified. Will copy the frontend-config from there.' ) ;
@@ -44,18 +42,15 @@ const fastify = Fastify({
4442Sentry . setupFastifyErrorHandler ( fastify ) ;
4543await fastify . register ( envPlugin ) ;
4644
47- fastify . register (
48- helmet ,
49- {
50- contentSecurityPolicy : {
51- directives : {
52- "connect-src" : [ "'self'" , "sdk.openui5.org" ] ,
53- "script-src" : isLocalDev ? [ "'self'" , "'unsafe-inline'" ] : [ "'self'" ] ,
54- "frame-ancestors" : [ fastify . config . FRAME_ANCESTORS ]
55- } ,
56- }
57- }
58- )
45+ fastify . register ( helmet , {
46+ contentSecurityPolicy : {
47+ directives : {
48+ 'connect-src' : [ "'self'" , 'sdk.openui5.org' , 'o1240783.ingest.us.sentry.io' ] ,
49+ 'script-src' : isLocalDev ? [ "'self'" , "'unsafe-inline'" ] : [ "'self'" ] ,
50+ 'frame-ancestors' : [ fastify . config . FRAME_ANCESTORS ] ,
51+ } ,
52+ } ,
53+ } ) ;
5954
6055fastify . register ( proxy , {
6156 prefix : '/api' ,
0 commit comments