diff options
| author | haturatu <taro@eyes4you.org> | 2025-10-13 07:01:46 +0900 |
|---|---|---|
| committer | haturatu <taro@eyes4you.org> | 2025-10-13 07:01:46 +0900 |
| commit | af646a893e3b66b2b868d2d0f4216362477a4fba (patch) | |
| tree | 4be49ae0140cb5b9849831333cbdccb0fdd279cc /handlers/php_proxy.go | |
| parent | 18991704b375db4e8d22785bb47f3e2e12cd016f (diff) | |
support: xsrf
Diffstat (limited to 'handlers/php_proxy.go')
| -rw-r--r-- | handlers/php_proxy.go | 6 |
1 files changed, 3 insertions, 3 deletions
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. |
