mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-19 00:09:16 +08:00
feat: 修改csrf作用域
This commit is contained in:
parent
16727105c4
commit
6ab24989fb
@ -12,6 +12,7 @@ import (
|
||||
func CSRF() gin.HandlerFunc {
|
||||
csrfMd := csrf.Protect(
|
||||
[]byte(global.CONF.Csrf.Key),
|
||||
csrf.Path("/api"),
|
||||
csrf.ErrorHandler(http.HandlerFunc(
|
||||
func(w http.ResponseWriter, r *http.Request) {
|
||||
w.WriteHeader(http.StatusForbidden)
|
||||
|
Loading…
x
Reference in New Issue
Block a user