Hide some ENV values.

This commit is contained in:
Abdulmhsen B. A. A
2024-05-03 20:18:18 +03:00
parent 85fcc593cd
commit f587b68972
4 changed files with 83 additions and 6 deletions

View File

@@ -17,6 +17,11 @@ final class Env
{
public const string URL = '%{api.prefix}/system/env';
private const array MASK = [
'WS_API_KEY',
'WS_CACHE_URL'
];
private EnvFile $envfile;
public function __construct()
@@ -43,6 +48,7 @@ final class Env
$response['data'][] = [
'key' => $key,
'value' => $val,
'mask' => in_array($key, self::MASK),
'urls' => [
'self' => (string)$request->getUri()->withPath(parseConfigValue(self::URL . '/' . $key)),
],