From f90165aee2f309b4cad57e81101c277164fcf4ff Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 11 Feb 2025 09:33:20 -0800 Subject: [PATCH] add cors to local dev server so webview can use it --- gui/vite.config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gui/vite.config.ts b/gui/vite.config.ts index d4c4ba7d7..6c5cd6d75 100644 --- a/gui/vite.config.ts +++ b/gui/vite.config.ts @@ -16,6 +16,14 @@ export default defineConfig({ }, }, }, + server: { + cors: { + origin: "*", + methods: ["GET", "POST", "PUT", "DELETE", "PATCH", "OPTIONS"], + allowedHeaders: ["*", "Content-Type", "Authorization"], + credentials: true, + }, + }, test: { globals: true, environment: "jsdom",