This commit is contained in:
Jay 2018-10-14 22:05:42 +08:00
parent 853f19aa97
commit df15a041a5

View File

@ -39,9 +39,6 @@ func NewServ() *gin.Engine {
corsConfig := cors.DefaultConfig()
corsConfig.AllowCredentials = true
corsConfig.AllowAllOrigins = true
corsConfig.AllowOriginFunc = func(origin string) bool {
return true
}
r.Use(cors.New(corsConfig))
// session
r.Use(sessions.Sessions("ginsess", store))