Ensured SimplifiedConfigParser properly handles obfuscate_remote_addr option

This commit is contained in:
Alejandro Celaya 2020-05-08 13:21:49 +02:00
parent ba13d99a71
commit bfdd6e0c50
2 changed files with 3 additions and 0 deletions

View File

@ -37,6 +37,7 @@ class SimplifiedConfigParser
'mercure_public_hub_url' => ['mercure', 'public_hub_url'],
'mercure_internal_hub_url' => ['mercure', 'internal_hub_url'],
'mercure_jwt_secret' => ['mercure', 'jwt_secret'],
'obfuscate_remote_addr' => ['url_shortener', 'obfuscate_remote_addr'],
];
private const SIMPLIFIED_CONFIG_SIDE_EFFECTS = [
'delete_short_url_threshold' => [

View File

@ -64,6 +64,7 @@ class SimplifiedConfigParserTest extends TestCase
'mercure_public_hub_url' => 'public_url',
'mercure_internal_hub_url' => 'internal_url',
'mercure_jwt_secret' => 'super_secret_value',
'obfuscate_remote_addr' => false,
];
$expected = [
'app_options' => [
@ -92,6 +93,7 @@ class SimplifiedConfigParserTest extends TestCase
'https://third-party.io/foo',
],
'default_short_codes_length' => 8,
'obfuscate_remote_addr' => false,
],
'delete_short_urls' => [