mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-27 22:00:24 +08:00
登录页尝试使用csrf校验
This commit is contained in:
12
internal/web/actions/default/csrf/init.go
Normal file
12
internal/web/actions/default/csrf/init.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package csrf
|
||||
|
||||
import "github.com/iwind/TeaGo"
|
||||
|
||||
func init() {
|
||||
TeaGo.BeforeStart(func(server *TeaGo.Server) {
|
||||
server.
|
||||
Prefix("/csrf").
|
||||
Get("/token", new(TokenAction)).
|
||||
EndAll()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user