mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-21 23:20:22 +00:00
Read RASPAP_API_KEY from Dotenv
This commit is contained in:
parent
4bf514c992
commit
5150224e66
1 changed files with 5 additions and 1 deletions
|
@ -3,6 +3,10 @@
|
|||
require_once 'includes/functions.php';
|
||||
require_once 'config.php';
|
||||
|
||||
$env = dirname(__DIR__, 1);
|
||||
$dotenv = Dotenv\Dotenv::createImmutable($env);
|
||||
$dotenv->safeLoad();
|
||||
|
||||
/**
|
||||
* Handler for RestAPI settings
|
||||
*/
|
||||
|
@ -12,7 +16,7 @@ function DisplayRestAPI()
|
|||
$status = new \RaspAP\Messages\StatusMessage;
|
||||
|
||||
// set defaults
|
||||
$apiKey = "Hx80npaPTol9fKeBnPwX7ib2"; //placeholder
|
||||
$apiKey = $_ENV['RASPAP_API_KEY'];
|
||||
|
||||
if (!RASPI_MONITOR_ENABLED) {
|
||||
if (isset($_POST['SaveAPIsettings'])) {
|
||||
|
|
Loading…
Reference in a new issue