From b2e6e2bfd5b8d97536a6daeb774136883f9fc3c4 Mon Sep 17 00:00:00 2001 From: "Alex \"mcmonkey\" Goodwin" Date: Wed, 4 Sep 2024 17:01:31 -0700 Subject: [PATCH] true full cors unlock don't ask me why but this is needed to truly completely unblock cors --- server/server.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/server.go b/server/server.go index c94bc62..3c5c885 100644 --- a/server/server.go +++ b/server/server.go @@ -42,9 +42,12 @@ func (s *Server) Start() error { e.HideBanner = true e.Use(drip_middleware.TracingMiddleware) e.Use(middleware.CORSWithConfig(middleware.CORSConfig{ - AllowOrigins: []string{"*"}, // This allows all origins - AllowMethods: []string{"*"}, - AllowHeaders: []string{"*"}, + AllowOrigins: []string{"*"}, // This allows all origins + AllowMethods: []string{"*"}, + AllowHeaders: []string{"*"}, + AllowOriginFunc: func(origin string) (bool, error) { + return true, nil + }, AllowCredentials: true, })) e.Use(middleware.RequestLoggerWithConfig(middleware.RequestLoggerConfig{