From e051c1d17f6d6024163dcaf82b309b8048067930 Mon Sep 17 00:00:00 2001 From: nquidox Date: Sun, 14 Sep 2025 14:13:05 +0300 Subject: [PATCH] set origin to avoid cors problems --- internal/router/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/router/handler.go b/internal/router/handler.go index e3b14d0..ae4f30a 100644 --- a/internal/router/handler.go +++ b/internal/router/handler.go @@ -39,7 +39,7 @@ func NewRouter(deps Deps) interfaces.Router { } engine.Use(cors.New(cors.Config{ - AllowOrigins: []string{"*"}, + AllowOrigins: []string{"http://localhost:5173"}, AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}, AllowHeaders: []string{"Origin", "Content-Type", "Authorization"}, ExposeHeaders: []string{"Content-Length"},