diff options
author | 2023-06-02 20:22:09 +0200 | |
---|---|---|
committer | 2023-06-02 20:22:09 +0200 | |
commit | ee498eadf93a1e5ffdc7932ed1519c875eadcd7d (patch) | |
tree | 0e0aa312bafc4de6ee0f1d9b496114563c2cc69b /docs/04_For_Developers/05_Debug_mode.md | |
parent | c5cd2294456c6a118885003f7beb6f32bb98bc68 (diff) | |
download | rss-bridge-ee498eadf93a1e5ffdc7932ed1519c875eadcd7d.tar.gz rss-bridge-ee498eadf93a1e5ffdc7932ed1519c875eadcd7d.tar.zst rss-bridge-ee498eadf93a1e5ffdc7932ed1519c875eadcd7d.zip |
fix: move debug mode to config (#3324)
* fix: move debug mode to config
* fix: also move debug_whitelist to .ini config
* fix: move logic back to Debug class
* docs
* docs
* fix: disable debug mode by default
* fix: restore previous behavior for alerts
* fix: center-align alert text
Diffstat (limited to 'docs/04_For_Developers/05_Debug_mode.md')
-rw-r--r-- | docs/04_For_Developers/05_Debug_mode.md | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/docs/04_For_Developers/05_Debug_mode.md b/docs/04_For_Developers/05_Debug_mode.md index 482ff0f5..6bdb1d48 100644 --- a/docs/04_For_Developers/05_Debug_mode.md +++ b/docs/04_For_Developers/05_Debug_mode.md @@ -5,23 +5,29 @@ Enabling debug mode on a public server may result in malicious clients retrievin *** Debug mode enables error reporting and prevents loading data from the cache (data is still written to the cache). -To enable debug mode, create a file named 'DEBUG' in the root directory of RSS-Bridge (next to `index.php`). For further security, insert your IP address in the file. You can add multiple addresses, one per line. +To enable debug mode, set in `config.ini.php`: + + enable_debug_mode = true + +Allow only explicit ip addresses: + + debug_mode_whitelist[] = 127.0.0.1 + debug_mode_whitelist[] = 192.168.1.10 _Notice_: * An empty file enables debug mode for anyone! * The bridge whitelist still applies! (debug mode does **not** enable all bridges) -RSS-Bridge will give you a visual feedback when debug mode is enabled: - - +RSS-Bridge will give you a visual feedback when debug mode is enabled. While debug mode is active, RSS-Bridge will write additional data to your servers `error.log`. Debug mode is controlled by the static class `Debug`. It provides three core functions: -`Debug::isEnabled()`: Returns `true` if debug mode is enabled. -`Debug::isSecure()`: Returns `true` if your client is on the debug whitelist. -`Debug::log($message)`: Adds a message to `error.log`. It takes one parameter, which can be anything. For example: `Debug::log('Hello World!');` +* `Debug::isEnabled()`: Returns `true` if debug mode is enabled. +* `Debug::log($message)`: Adds a message to `error.log`. It takes one parameter, which can be anything. + +Example: `Debug::log('Hello World!');` **Notice**: `Debug::log($message)` calls `Debug::isEnabled()` internally. You don't have to do that manually.
\ No newline at end of file |