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 = [
17
17
key : "X-XSS-Protection" ,
18
18
value : "1; mode=block" ,
19
19
} ,
20
- {
21
- key : "X-Frame-Options" ,
22
- value : "SAMEORIGIN" ,
23
- } ,
24
20
{
25
21
key : "Referrer-Policy" ,
26
22
value : "origin-when-cross-origin" ,
27
23
} ,
28
- {
29
- key : "Content-Security-Policy" ,
30
- value : ContentSecurityPolicy . replace ( / \s { 2 , } / g, " " ) . trim ( ) ,
31
- } ,
32
24
] ;
33
25
34
26
const optionsForExport = {
@@ -45,19 +37,30 @@ const optionsForBuild = {
45
37
{
46
38
// Apply these headers to all routes in your application.
47
39
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
+ ] ,
61
64
} ,
62
65
] ;
63
66
} ,
You can’t perform that action at this time.
0 commit comments