From b2f27aa3f4322ce5a5bb6a3360fd91ab821b2de7 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Sun, 3 Oct 2021 14:23:32 +0200 Subject: [PATCH] feat: add special disable --- config.example.php | 3 ++- index.php | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/config.example.php b/config.example.php index 5118a3a..5610754 100644 --- a/config.example.php +++ b/config.example.php @@ -32,5 +32,6 @@ return [ ], 'auth' => [ 'root' => 'password' - ] + ], + 'special_token' => 'password' ]; \ No newline at end of file diff --git a/index.php b/index.php index 30b28c5..0ca857f 100644 --- a/index.php +++ b/index.php @@ -3,6 +3,26 @@ require('utils.php'); require('load_config.php'); +/* Disable function */ +if (file_exists('./DISABLE')) { + header('X-Disabled: Yes'); + http_response_code(503); + ?> +

503

+ +