default no debug. clever solution for api keys in git ignored local conf file.
This commit is contained in:
parent
6a122e3bed
commit
d185a26f87
5 changed files with 37 additions and 5 deletions
|
|
@ -1,6 +1,17 @@
|
|||
<?php
|
||||
include_once 'conf.php';
|
||||
|
||||
// Load gitignored local overrides (API keys, debug toggle) if present
|
||||
$localConf = __DIR__ . '/conf.local.php';
|
||||
if (file_exists($localConf)) {
|
||||
require_once $localConf;
|
||||
}
|
||||
|
||||
// Fallback: try environment variable if still not defined
|
||||
if (!defined('BRAVE_API_KEY')) {
|
||||
define('BRAVE_API_KEY', getenv('BRAVE_API_KEY') ?: 'your api key');
|
||||
}
|
||||
|
||||
/**
|
||||
* Define some app-wide constants
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue