d5 / middlewares /cors.go
sanbo
upate
6390363
raw
history blame contribute delete
236 Bytes
package middlewares
import "github.com/gin-gonic/gin"
func Cors(c *gin.Context) {
c.Header("Access-Control-Allow-Origin", "*")
c.Header("Access-Control-Allow-Methods", "*")
c.Header("Access-Control-Allow-Headers", "*")
c.Next()
}