From af646a893e3b66b2b868d2d0f4216362477a4fba Mon Sep 17 00:00:00 2001 From: haturatu Date: Mon, 13 Oct 2025 07:01:46 +0900 Subject: support: xsrf --- handlers/php_proxy.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'handlers/php_proxy.go') diff --git a/handlers/php_proxy.go b/handlers/php_proxy.go index 24a38dc..e6966d6 100644 --- a/handlers/php_proxy.go +++ b/handlers/php_proxy.go @@ -3,6 +3,7 @@ package handlers import ( "auth-proxy/config" "auth-proxy/logging" + "auth-proxy/middleware" "auth-proxy/worker" "bytes" "io" @@ -13,7 +14,6 @@ import ( "strconv" "strings" - "github.com/gorilla/csrf" fcgiclient "github.com/tomasen/fcgi_client" ) @@ -79,8 +79,8 @@ func NewPhpProxyHandler(scriptName string) http.Handler { env["AUTH_PATH_ADMIN_USERS_API"] = config.Paths.AdminUsersAPI env["AUTH_ASSETS_PATH"] = config.Paths.Assets - // Pass CSRF token to PHP - env["HTTP_X_CSRF_TOKEN"] = csrf.Token(r) + // Pass XSRF token to PHP + env["HTTP_X_XSRF_TOKEN"] = middleware.GetXSRFToken(r) // Asynchronously log the proxying action to avoid blocking the request. -- cgit v1.2.3