about summary refs log tree commit diff stats
path: root/classes/CsrfMiddleware.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/CsrfMiddleware.php')
-rw-r--r--classes/CsrfMiddleware.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/CsrfMiddleware.php b/classes/CsrfMiddleware.php
index 1c4af2e..1a49d48 100644
--- a/classes/CsrfMiddleware.php
+++ b/classes/CsrfMiddleware.php
@@ -20,7 +20,7 @@ class CsrfMiddleware implements MiddlewareInterface
 		if (!in_array($op, $this->csrfIgnore) && !validate_csrf($csrfToken)) {
 			$response = (new Response())
 				->withStatus(401)
-				->withBody("Unauthorized (CSRF)");
+				->withBody(json_encode(["error" => "Unauthorized (CSRF)"]));
 			$response->send();
 			exit;
 		}