From 8aad0f09970537d003d7f18e50c08e4c217aa8ee Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 23 Jan 2025 14:21:27 -0500 Subject: [PATCH] refactor: Allow cross-origin requests -- https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6 --- buildchain/vite.config.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/buildchain/vite.config.ts b/buildchain/vite.config.ts index 41abd006a..75b5204fe 100644 --- a/buildchain/vite.config.ts +++ b/buildchain/vite.config.ts @@ -63,10 +63,15 @@ export default defineConfig(({command}) => ({ preserveSymlinks: true, }, server: { - cors: true, // Allow cross-origin requests -- https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6 + // Allow cross-origin requests -- https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6 + allowedHosts: true, + cors: true, fs: { strict: false }, + headers: { + "Access-Control-Allow-Private-Network": "true", + }, host: '0.0.0.0', origin: 'http://localhost:' + process.env.DEV_PORT, port: parseInt(process.env.DEV_PORT),