From 77cfcbc9e9ce9ed676887f0471dff2a31e9c4f76 Mon Sep 17 00:00:00 2001 From: twotalesanimation <80506065+twotalesanimation@users.noreply.github.com> Date: Wed, 8 Jul 2026 19:54:24 +0200 Subject: [PATCH] API Updates --- middleware.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/middleware.ts b/middleware.ts index 7b78182..f71074d 100644 --- a/middleware.ts +++ b/middleware.ts @@ -24,6 +24,12 @@ export default auth((req) => { // Allow external/scripting API routes (authenticated via API key header) if (pathname.startsWith("/api/ext/")) return; + // Allow display device routes (ESP32 dot-matrix, authenticated via API key header) + if (pathname.startsWith("/api/display/")) return; + + // Allow dashboard stats via display key (ESP32 polls this) + if (pathname === "/api/dashboard/stats") return; + // Allow local file serving (needed for video playback in client portal) if (pathname.startsWith("/api/files/")) return;