Updated Wrapper

This commit is contained in:
Pablo Ferreiro 2022-02-15 13:55:36 +01:00
parent a11a17f9d2
commit 9711bb903c
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
3 changed files with 13 additions and 9 deletions

View file

@ -18,7 +18,7 @@ class Misc {
}
static public function env(string $key, string $default_value): string {
return isset($_ENV[$key]) && !empty($_ENV[$key]) ? $_ENV[$key] : $default_value;
return $_ENV[$key] ?? $default_value;
}
/**
@ -33,7 +33,8 @@ class Misc {
*/
static public function api(): \TikScraper\Api {
$options = [
'remote_signer' => self::env('SIGNER_URL', 'http://localhost:8080/signature')
'remote_signer' => self::env('SIGNER_URL', 'http://localhost:8080/signature'),
'use_test_endpoints' => self::env('USE_TEST_ENDPOINTS', false)
];
$cacheEngine = false;
// Proxy config