[#368] Ensure output buffer is empty before serving files

This commit is contained in:
Matthew Hilton
2025-02-27 08:28:01 +10:00
parent 43d82333ca
commit da0f7c5865

View File

@@ -69,6 +69,11 @@ function auth_outage_bootstrap_callback() {
http_response_code(404);
die('File not found.');
}
// Ensure there is nothing in the output buffer.
// otherwise the file will not be read correctly.
ob_clean();
readfile($file);
exit(0);
}