From 9432beccfd3b44026c9e06b8132edb466fd6f12c Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Wed, 21 Aug 2024 20:20:43 -0700 Subject: [PATCH] Force the new UI to be the default (#1354) --- files/www/cgi-bin/status | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/files/www/cgi-bin/status b/files/www/cgi-bin/status index 19b83771..eb83931d 100755 --- a/files/www/cgi-bin/status +++ b/files/www/cgi-bin/status @@ -35,6 +35,17 @@ --]] +-- Super early new UI redirect +if os.getenv("HTTP_REFERER"):match("^http.+//[^/]+/?$") then + print("Status: 307 Temporary Redirect") + print("Cache-Control: no-store\r") + print("Access-Control-Allow-Origin: *\r") + print("Location: /a/status\r") + print "\r" + io.flush() + return +end + require("nixio") require("aredn.hardware") require("aredn.http")