mirror of
https://github.com/gofiber/fiber.git
synced 2025-02-22 21:23:46 +00:00
Helmet
Install
go get -u github.com/gofiber/fiber/v2
go get -u github.com/gofiber/helmet/v2
Example
package main
import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/helmet/v2"
)
func main() {
app := fiber.New()
app.Use(helmet.New())
app.Get("/", func(c *fiber.Ctx) error {
return c.SendString("Welcome!")
})
app.Listen(":3000")
}
Test
curl -I http://localhost:3000