make no_auth reporting work
parent
187494cd50
commit
bd7e63b617
|
@ -90,6 +90,9 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
|||
);
|
||||
exit();
|
||||
}
|
||||
if ($mode === "NO_AUTH") {
|
||||
$fileName = "backups.json";
|
||||
} else {
|
||||
$fileName = $_GET["user"];
|
||||
if (!isset($credentials[$fileName])) {
|
||||
header("HTTP/1.0 404 Not Found");
|
||||
|
@ -97,6 +100,8 @@ if (!isset($credentials[$fileName])) {
|
|||
exit();
|
||||
}
|
||||
$fileName .= ".json";
|
||||
}
|
||||
|
||||
header("Content-Type: text/plain");
|
||||
$maxAge = isset($_GET["maxage"]) ? intval($_GET["maxage"]) : 28;
|
||||
$maxAge = $maxAge * 60 * 60;
|
||||
|
|
Loading…
Reference in New Issue