mirror of
https://github.com/gofiber/fiber.git
synced 2025-02-23 19:04:05 +00:00
10 lines
220 B
Go
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()
|
|
}
|