From 5d124df47b72fd1126d5fd6e64b44cec3e7a5f27 Mon Sep 17 00:00:00 2001 From: snider Date: Wed, 31 Dec 2025 04:09:11 +0000 Subject: [PATCH] fix: Update CORS config to use valid http origin for Wails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The wails:// scheme is not supported by gin-contrib/cors v1.7.6 which requires origins to be http://, https://, or *. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- pkg/mining/service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/mining/service.go b/pkg/mining/service.go index 743b7f0..f048800 100644 --- a/pkg/mining/service.go +++ b/pkg/mining/service.go @@ -104,7 +104,7 @@ func (s *Service) InitRouter() { "http://127.0.0.1:9090", "http://localhost:" + serverPort, "http://127.0.0.1:" + serverPort, - "wails://wails", // Wails desktop app + "http://wails.localhost", // Wails desktop app (uses localhost origin) }, AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}, AllowHeaders: []string{"Origin", "Content-Type", "Accept", "Authorization"},