add DELETE to allowed cors methods (#1001)

This commit is contained in:
Tomas Knappek
2018-05-16 14:25:02 -07:00
committed by Shiva
parent c7aaf732fe
commit f6d47fd0ed

View File

@@ -39,6 +39,8 @@ func optionalCorsWrap(r *gin.Engine) {
corsConfig.AllowHeaders = headers corsConfig.AllowHeaders = headers
} }
corsConfig.AllowMethods = []string{"GET", "POST", "PUT", "HEAD", "DELETE"}
logrus.Infof("CORS enabled for domains: %s", origins) logrus.Infof("CORS enabled for domains: %s", origins)
r.Use(cors.New(corsConfig)) r.Use(cors.New(corsConfig))