diff --git a/main.go b/main.go index eb522bf..45b72b9 100644 --- a/main.go +++ b/main.go @@ -22,7 +22,7 @@ func getEnv(k, def string) string { func CorsMiddleware() gin.HandlerFunc { return func(c *gin.Context) { c.Writer.Header().Set("Access-Control-Allow-Origin", "*") // Or specify specific origins - c.Writer.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS") + c.Writer.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, PATCH, OPTIONS") c.Writer.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization") c.Writer.Header().Set("Access-Control-Expose-Headers", "Content-Length, Content-Type") c.Writer.Header().Set("Access-Control-Allow-Credentials", "true")