File tree 3 files changed +10
-6
lines changed 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 3
3
< head >
4
4
< meta charset ="UTF-8 " />
5
5
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
6
+ <!-- Add a relaxed CSP for development -->
7
+ < meta http-equiv ="Content-Security-Policy " content ="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src 'self' ws: wss:; style-src 'self' 'unsafe-inline'; ">
6
8
7
9
<!-- Favicon with responsive image format support -->
8
10
< link rel ="icon " href ="/images/glue.svg " type ="image/svg+xml ">
Original file line number Diff line number Diff line change 4
4
"version" : " 0.0.0" ,
5
5
"type" : " module" ,
6
6
"scripts" : {
7
- "dev" : " vite" ,
7
+ "dev" : " vite --port 3001 " ,
8
8
"build" : " tsc -b && vite build" ,
9
9
"lint" : " eslint ." ,
10
10
"preview" : " vite preview" ,
Original file line number Diff line number Diff line change @@ -189,6 +189,7 @@ const efficientCachePolicy = (): Plugin => {
189
189
190
190
// https://vitejs.dev/config/
191
191
export default defineConfig ( {
192
+ base : process . env . NODE_ENV === 'production' ? '/GLUE/' : '/' ,
192
193
plugins : [
193
194
react ( ) , // Use default React transformation
194
195
fixMimeTypes ( ) , // Apply MIME type fixes
@@ -256,13 +257,14 @@ export default defineConfig({
256
257
} ,
257
258
} ,
258
259
] ,
259
- base : process . env . BASE_URL || '/GLUE/' ,
260
260
server : {
261
261
headers : {
262
- 'Cross-Origin-Embedder-Policy' : 'require-corp' ,
263
- 'Cross-Origin-Opener-Policy' : 'same-origin' ,
264
- 'Cross-Origin-Resource-Policy' : 'same-origin' ,
265
- 'Content-Type' : 'application/javascript; charset=utf-8'
262
+ 'Access-Control-Allow-Origin' : '*' ,
263
+ 'Content-Security-Policy' : "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src 'self' ws: wss:; style-src 'self' 'unsafe-inline';"
264
+ } ,
265
+ cors : true ,
266
+ hmr : {
267
+ overlay : true ,
266
268
} ,
267
269
strictPort : true ,
268
270
middlewareMode : false
You can’t perform that action at this time.
0 commit comments