Add debug option in SFTPGo authenticator

This commit is contained in:
Miraty 2023-04-15 18:01:19 +02:00
parent b93ff0c26f
commit 9f7c93e66d

View file

@ -1,8 +1,12 @@
<?php
const DEBUG = false;
!DEBUG or ob_start();
require 'router.php';
function deny() {
!DEBUG or file_put_contents(ROOT_PATH . '/db/debug.txt', ob_get_contents());
http_response_code(403);
exit();
}
@ -38,4 +42,6 @@ echo '
}
}
';
!DEBUG or file_put_contents(ROOT_PATH . '/db/debug.txt', ob_get_contents());
http_response_code(200);