|
@@ -8,5 +8,8 @@ import (
|
|
|
func CORS() gin.HandlerFunc {
|
|
func CORS() gin.HandlerFunc {
|
|
|
config := cors.DefaultConfig()
|
|
config := cors.DefaultConfig()
|
|
|
config.AllowAllOrigins = true
|
|
config.AllowAllOrigins = true
|
|
|
|
|
+ config.AllowCredentials = true
|
|
|
|
|
+ config.AllowMethods = []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"}
|
|
|
|
|
+ config.AllowHeaders = []string{"Origin", "Content-Length", "Content-Type", "Authorization", "Accept", "Connection"}
|
|
|
return cors.New(config)
|
|
return cors.New(config)
|
|
|
}
|
|
}
|