Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gogf/csrf
CSRF middleware for GoFrame web server.
https://github.com/gogf/csrf
csrf gf goframe middleware
Last synced: 3 months ago
JSON representation
CSRF middleware for GoFrame web server.
- Host: GitHub
- URL: https://github.com/gogf/csrf
- Owner: gogf
- Created: 2020-02-07T07:32:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-05-31T01:57:08.000Z (over 1 year ago)
- Last Synced: 2024-07-13T14:31:50.862Z (4 months ago)
- Topics: csrf, gf, goframe, middleware
- Language: Go
- Homepage: https://goframe.org
- Size: 9.77 KB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
- awesome-gf - csrf - CSRF middleware for GoFrame web server. (Libraries and Plugins)
README
# csrf
csrf middleware for goframe web module
## How to use
```go
// v2 for gf/v2
go get github.com/gogf/csrf/v2// v1 for gf
go get github.com/gogf/csrf
```[example](example_test.go)
## Check the effect by web request(GET before POST)
http://127.0.0.1:8199/api.v2/csrf
You can get token value(default name _csrf) in cookies
You can set the token in request with param(Router < Query < Body < Form < Custom < Header)