fix: properly use HTTP_ACCEPT to detect image rather than SEC_FETCH_DEST

This commit is contained in:
David Bailey 2023-12-18 16:01:06 +01:00
parent f2f8a235c8
commit b8ae2c5617

View file

@ -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) {