1
0
mirror of https://github.com/gofiber/fiber.git synced 2025-02-23 19:04:05 +00:00
fiber/middleware/cors.go
2020-02-01 19:42:40 +03:00

10 lines
220 B
Go

package middleware
import "github.com/gofiber/fiber"
// Cors : Enable cross-origin resource sharing (CORS) with various options.
func Cors(c *fiber.Ctx, d string) {
c.Set("Access-Control-Allow-Origin", d)
c.Next()
}