diff options
Diffstat (limited to 'handlers/php_proxy.go')
| -rw-r--r-- | handlers/php_proxy.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/handlers/php_proxy.go b/handlers/php_proxy.go index d30f363..24a38dc 100644 --- a/handlers/php_proxy.go +++ b/handlers/php_proxy.go @@ -13,6 +13,7 @@ import ( "strconv" "strings" + "github.com/gorilla/csrf" fcgiclient "github.com/tomasen/fcgi_client" ) @@ -78,6 +79,9 @@ 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) + // Asynchronously log the proxying action to avoid blocking the request. worker.Submit(workerPool, func() { |
