Upgrade twig to version 3 for php 8.1
[anoweco.git] / www / auth.php
index 22e3de9f0195375b6425083b2575ac94a958b97c..d47642c97bab9d95416044a80a89fcef6d9f693c 100644 (file)
@@ -146,8 +146,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'GET') {
             error('Invalid signature');
         }
         header('HTTP/1.0 200 OK');
-        header('Content-type: application/x-www-form-urlencoded');
-        echo http_build_query(['me' => $me]);
+        header('Content-type: application/json');
+        echo json_encode(['me' => $me]);
         exit();
     }
 } else if ($_SERVER['REQUEST_METHOD'] == 'HEAD') {