From dd5e40915243c34558b02b91c19122c9d7c16b1a Mon Sep 17 00:00:00 2001 From: JongYeob Sheen Date: Thu, 22 Feb 2024 20:19:50 +0900 Subject: [PATCH] config.AllowOrigins https://*.codingschool.co.kr --- internal/routers/router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/routers/router.go b/internal/routers/router.go index b39a29b..f6d0a9d 100644 --- a/internal/routers/router.go +++ b/internal/routers/router.go @@ -15,7 +15,7 @@ func Init() { Router = gin.Default() config := cors.DefaultConfig() - config.AllowOrigins = []string{"http://127.0.0.1:3000", "http://localhost:3000", "http://localhost:3030", "https://cslms-api.codingschool.co.kr"} + config.AllowOrigins = []string{"http://127.0.0.1:3000", "http://localhost:3000", "http://localhost:3030", "https://*.codingschool.co.kr"} config.AllowMethods = []string{"GET", "POST", "PUT", "DELETE", "PATCH"} config.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type"} Router.Use(cors.New(config))