From 1bc18ddfb18dcc588d1914347e08d98741846fc3 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Tue, 28 Jan 2025 20:15:51 -0500 Subject: [PATCH] refactor: Restrict CORS to local dev environments --- buildchain/vite.config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buildchain/vite.config.ts b/buildchain/vite.config.ts index fb4307a5..15e95408 100644 --- a/buildchain/vite.config.ts +++ b/buildchain/vite.config.ts @@ -67,7 +67,9 @@ export default defineConfig(({command}) => ({ server: { // Allow cross-origin requests -- https://github.com/vitejs/vite/security/advisories/GHSA-vg6x-rcgg-rjx6 allowedHosts: true, - cors: true, + cors: { + origin: /(.local|.site|localhost)/ + }, fs: { strict: false },