ClearCookie

Expire a client cookie (or all cookies if left empty)

  1. c.ClearCookie(key ...string)
  1. app.Get("/", func(c *fiber.Ctx) {
  2. // Clears all cookies:
  3. c.ClearCookie()
  4.  
  5. // Expire specific cookie by name:
  6. c.ClearCookie("user")
  7.  
  8. // Expire multiple cookies by names:
  9. c.ClearCookie("token", "session", "track_id", "version")
  10. })