File tree Expand file tree Collapse file tree 1 file changed +24
-21
lines changed
npm-packages/dashboard-self-hosted Expand file tree Collapse file tree 1 file changed +24
-21
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,10 @@ const securityHeaders = [
1717 key : "X-XSS-Protection" ,
1818 value : "1; mode=block" ,
1919 } ,
20- {
21- key : "X-Frame-Options" ,
22- value : "SAMEORIGIN" ,
23- } ,
2420 {
2521 key : "Referrer-Policy" ,
2622 value : "origin-when-cross-origin" ,
2723 } ,
28- {
29- key : "Content-Security-Policy" ,
30- value : ContentSecurityPolicy . replace ( / \s { 2 , } / g, " " ) . trim ( ) ,
31- } ,
3224] ;
3325
3426const optionsForExport = {
@@ -45,19 +37,30 @@ const optionsForBuild = {
4537 {
4638 // Apply these headers to all routes in your application.
4739 source : "/:path*" ,
48- headers : process . env . EMBEDDED_CORS_HEADERS
49- ? [
50- ...securityHeaders ,
51- {
52- key : "Cross-Origin-Resource-Policy" ,
53- value : "cross-origin" ,
54- } ,
55- {
56- key : "Cross-Origin-Embedder-Policy" ,
57- value : "require-corp" ,
58- } ,
59- ]
60- : securityHeaders ,
40+ headers : [
41+ ...securityHeaders ,
42+ ...( process . env . EMBEDDED_CORS_HEADERS
43+ ? [
44+ {
45+ key : "Cross-Origin-Resource-Policy" ,
46+ value : "cross-origin" ,
47+ } ,
48+ {
49+ key : "Cross-Origin-Embedder-Policy" ,
50+ value : "require-corp" ,
51+ } ,
52+ ]
53+ : [
54+ {
55+ key : "X-Frame-Options" ,
56+ value : "SAMEORIGIN" ,
57+ } ,
58+ {
59+ key : "Content-Security-Policy" ,
60+ value : ContentSecurityPolicy . replace ( / \s { 2 , } / g, " " ) . trim ( ) ,
61+ } ,
62+ ] ) ,
63+ ] ,
6164 } ,
6265 ] ;
6366 } ,
You can’t perform that action at this time.
0 commit comments