File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 11import * as fs from 'fs'
22import { hstsName , hstsValue } from 'shared/headers'
3+ import { throwExp } from 'shared/utility'
34
45const contents = `/*
56 Cross-Origin-Embedder-Policy: require-corp
67 Cross-Origin-Opener-Policy: same-origin
78 Cross-Origin-Resource-Policy: cross-origin
8- Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; frame-ancestors ${ process . env . VITE_APP_ORIGIN } ;
9+ Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; frame-ancestors ${ process . env . VITE_APP_ORIGIN ?? throwExp ( ) } ;
910 ${ hstsName } : ${ hstsValue } `
1011
1112fs . writeFile ( './dist/_headers' , contents , ( err ) => {
Original file line number Diff line number Diff line change 11import * as fs from 'fs'
22import { hstsName , hstsValue } from 'shared/headers'
3+ import { throwExp } from 'shared/utility'
34
45const contents = `/*
56 Cross-Origin-Embedder-Policy: require-corp
@@ -10,7 +11,7 @@ const contents = `/*
1011
1112/hubmessenger
1213 ! Content-Security-Policy
13- Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; frame-ancestors ${ process . env . VITE_HUB_ORIGIN } ;
14+ Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; frame-ancestors ${ process . env . VITE_HUB_ORIGIN ?? throwExp ( ) } ;
1415`
1516
1617fs . writeFile ( './dist/_headers' , contents , ( err ) => {
Original file line number Diff line number Diff line change 11import * as fs from 'fs'
22import { hstsName , hstsValue } from 'shared/headers'
3+ import { throwExp } from 'shared/utility'
34
45const contents = `/*
56 Cross-Origin-Embedder-Policy: require-corp
67 Cross-Origin-Opener-Policy: same-origin
78 Cross-Origin-Resource-Policy: cross-origin
8- Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; frame-ancestors ${ process . env . VITE_HUB_ORIGIN } ;
9+ Content-Security-Policy: default-src 'self'; style-src 'self' 'unsafe-inline'; frame-ancestors ${ process . env . VITE_HUB_ORIGIN ?? throwExp ( ) } ;
910 ${ hstsName } : ${ hstsValue } `
1011
1112fs . writeFile ( './dist/_headers' , contents , ( err ) => {
You can’t perform that action at this time.
0 commit comments