fix: Update CORS config to use valid http origin for Wails

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 <noreply@anthropic.com>
This commit is contained in:
snider 2025-12-31 04:09:11 +00:00
parent 0735445eb0
commit 5d124df47b

View file

@ -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"},