From bfa8445f780a6bf0d8368898a72702427f7a7855 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Wed, 6 Nov 2024 19:43:43 +0200 Subject: [PATCH] Change AllowOrigin from everything to Svelte frontend --- cmd/http-server/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/http-server/main.go b/cmd/http-server/main.go index 28b34d9..73939cb 100644 --- a/cmd/http-server/main.go +++ b/cmd/http-server/main.go @@ -32,7 +32,7 @@ func main() { r := gin.Default() docs.SwaggerInfo.BasePath = "/api" r.Use(cors.New(cors.Config{ - AllowOrigins: []string{"*"}, + AllowOrigins: []string{"http://localhost:5173"}, AllowMethods: []string{"GET", "DELETE", "PUT", "PATCH", "OPTIONS"}, AllowHeaders: []string{"Origin", "Content-Type"}, ExposeHeaders: []string{"Content-Length"},