mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-07 23:25:30 +08:00
feat: 修改csrf作用域
This commit is contained in:
parent
7ef50b6205
commit
d460f0fc3c
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue