https://github.com/vanng822/gin-csrf
Cookie-to-header csrf for gin
https://github.com/vanng822/gin-csrf
Last synced: about 2 months ago
JSON representation
Cookie-to-header csrf for gin
- Host: GitHub
- URL: https://github.com/vanng822/gin-csrf
- Owner: vanng822
- License: mit
- Created: 2016-08-24T18:00:02.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2025-03-01T20:42:16.000Z (over 1 year ago)
- Last Synced: 2025-04-30T05:48:10.640Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 43 KB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gin-csrf
Cookie-to-header csrf for gin with max usage feature. Using this package in conjunction with session. Cookie is only the transport.
# Usage
```go
router := gin.Default()
options := csrf.DefaultOptions()
options.MaxUsage = 10
options.MaxAge = 15 * 60
router.Use(csrf.Csrf(options))
```