From b8ae2c5617482f63d9c7154e9baea8467c04f45f Mon Sep 17 00:00:00 2001 From: David Bailey Date: Mon, 18 Dec 2023 16:01:06 +0100 Subject: [PATCH] fix: properly use HTTP_ACCEPT to detect image rather than SEC_FETCH_DEST --- www/router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/router.php b/www/router.php index 641ec70..bc62715 100644 --- a/www/router.php +++ b/www/router.php @@ -74,7 +74,7 @@ if(preg_match('/^\/api\/admin/', $SURI)) { echo $twig->render('upload.html'); } -} elseif($_SERVER['HTTP_SEC_FETCH_DEST'] == 'image') { +} elseif(preg_match('/^\s*image/', $_SERVER['HTTP_ACCEPT'])) { header('Location: /raw' . $SURI); exit(0); } elseif(true) {