From d9cf9674f32bd1ef8cc79a98564d8b10579d885e Mon Sep 17 00:00:00 2001 From: flashwave <me@flash.moe> Date: Tue, 22 Apr 2025 22:20:13 +0000 Subject: [PATCH] Check for empty array. --- VERSION | 2 +- src/Chat/ChatApiRoutes.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 1214bdb5..797af288 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -20250422.2 +20250422.3 diff --git a/src/Chat/ChatApiRoutes.php b/src/Chat/ChatApiRoutes.php index e575cb6b..8d7132ac 100644 --- a/src/Chat/ChatApiRoutes.php +++ b/src/Chat/ChatApiRoutes.php @@ -181,6 +181,9 @@ final class ChatApiRoutes implements RouteHandler, UrlSource { secure: $secure, ), false); + if(empty($servers)) + return 404; + $response->setCacheControl('max-age=300', 'stale-if-error=600', 'public', 'immutable'); // the algo of all time