Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

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)