JongYeob Sheen 2024-02-22 20:27:28 +09:00
parent dd5e409152
commit 9e5f24949d

View File

@ -15,7 +15,7 @@ func Init() {
Router = gin.Default() Router = gin.Default()
config := cors.DefaultConfig() 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.AllowMethods = []string{"GET", "POST", "PUT", "DELETE", "PATCH"}
config.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type"} config.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type"}
Router.Use(cors.New(config)) Router.Use(cors.New(config))