https://github.com/vanng822/gin-csrf
Cookie-to-header csrf for gin
https://github.com/vanng822/gin-csrf
Last synced: 5 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 (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-04T12:45:09.000Z (12 months ago)
- Last Synced: 2024-06-20T17:49:14.984Z (10 months ago)
- Language: Go
- Homepage:
- Size: 35.2 KB
- Stars: 4
- Watchers: 4
- 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))
```