1
0
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:
zhengkunwang223 2022-08-17 15:02:17 +08:00
parent 16727105c4
commit 6ab24989fb

View File

@ -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)