From e55e33ddb22b7316592d60f31d2f4a82a46f79a2 Mon Sep 17 00:00:00 2001 From: scanash00 Date: Sun, 1 Mar 2026 00:44:21 -0900 Subject: [PATCH] this wasnt needed --- backend/cmd/server/main.go | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/backend/cmd/server/main.go b/backend/cmd/server/main.go index ffde06c..fa7b912 100644 --- a/backend/cmd/server/main.go +++ b/backend/cmd/server/main.go @@ -6,7 +6,6 @@ import ( "net/http" "os" "os/signal" - "strings" "syscall" "time" @@ -63,25 +62,7 @@ func main() { r.Use(middleware.Throttle(100)) r.Use(cors.Handler(cors.Options{ - AllowOriginFunc: func(r *http.Request, origin string) bool { - if strings.HasPrefix(origin, "chrome-extension://") || - strings.HasPrefix(origin, "moz-extension://") || - strings.HasPrefix(origin, "safari-web-extension://") { - return true - } - allowedOrigins := []string{ - "https://margin.at", - "https://www.margin.at", - "http://localhost:4321", - "http://localhost:8081", - } - for _, allowed := range allowedOrigins { - if origin == allowed { - return true - } - } - return false - }, + AllowedOrigins: []string{"https://*", "http://*", "chrome-extension://*"}, AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}, AllowedHeaders: []string{"Accept", "Authorization", "Content-Type", "X-CSRF-Token", "X-Session-Token"}, ExposedHeaders: []string{"Link"}, -- 2.51.2