Skip to content

Fenny/csrf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSRF

Release Discord Test Security Linter

Install

go get -u github.com/gofiber/fiber
go get -u github.com/gofiber/csrf

Example

package main

import (
  "github.com/gofiber/fiber"
  "github.com/gofiber/csrf"
)

func main() {
  app := fiber.New()

  app.Get("/", func(c *fiber.Ctx) {
    c.Send(c.Locals("csrf"))
  })

  app.Use(csrf.New())

  app.Post("/register", func(c *fiber.Ctx) {
    c.Send("Welcome!")
  })

  app.Listen(3000)
}

About

🧬 CSRF middleware for Fiber

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Go 100.0%