From 9e5f24949d21c46dfb743cd50d7e1e0f8b01ea92 Mon Sep 17 00:00:00 2001 From: JongYeob Sheen Date: Thu, 22 Feb 2024 20:27:28 +0900 Subject: [PATCH] config.AllowOrgins "https://cslms-api.codingschool.co.kr", "https://cslms-webapp.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 f6d0a9d..850bb0b 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://*.codingschool.co.kr"} + config.AllowOrigins = []string{"http://127.0.0.1:3000", "http://localhost:3000", "http://localhost:3030", "https://cslms-api.codingschool.co.kr", "https://cslms-webapp.codingschool.co.kr"} config.AllowMethods = []string{"GET", "POST", "PUT", "DELETE", "PATCH"} config.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type"} Router.Use(cors.New(config))