diff --git a/app/lib/App/Core/AccessControl.php b/app/lib/App/Core/AccessControl.php index e3a0268..77ce340 100644 --- a/app/lib/App/Core/AccessControl.php +++ b/app/lib/App/Core/AccessControl.php @@ -23,7 +23,8 @@ class AccessControl // routes that need power level 1 and up [ "routes" => [ - "race/*" + "race/simulator.php", + "race/configure/*" ], "catcher" => [ "name" => "page", diff --git a/app/lib/App/SSE/Sender.php b/app/lib/App/SSE/Sender.php index 706337d..6eb59d0 100644 --- a/app/lib/App/SSE/Sender.php +++ b/app/lib/App/SSE/Sender.php @@ -9,7 +9,7 @@ namespace App\SSE; */ class Sender { - public function __construct() + public function start(): void { header("Cache-Control: no-store"); header("Content-Type: text/event-stream"); @@ -17,9 +17,13 @@ class Sender // as session data is locked to prevent concurrent writes we // make it read only to prevent the server from locking up session_write_close(); + + // we have to flush before because idk + ob_end_flush(); + flush(); } - public function send($data, $event = NULL): void + public function flush($data, $event = NULL): void { if ($event) { diff --git a/app/view/pages/race/live-results.php b/app/view/pages/race/live-results.php index d979abc..e9a3e0b 100644 --- a/app/view/pages/race/live-results.php +++ b/app/view/pages/race/live-results.php @@ -1,10 +1,26 @@
Venter på data...
+Some shit | +Some shit | +
---|