mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Ensured SimplifiedConfigParser properly handles obfuscate_remote_addr option
This commit is contained in:
@@ -37,6 +37,7 @@ class SimplifiedConfigParser
|
|||||||
'mercure_public_hub_url' => ['mercure', 'public_hub_url'],
|
'mercure_public_hub_url' => ['mercure', 'public_hub_url'],
|
||||||
'mercure_internal_hub_url' => ['mercure', 'internal_hub_url'],
|
'mercure_internal_hub_url' => ['mercure', 'internal_hub_url'],
|
||||||
'mercure_jwt_secret' => ['mercure', 'jwt_secret'],
|
'mercure_jwt_secret' => ['mercure', 'jwt_secret'],
|
||||||
|
'obfuscate_remote_addr' => ['url_shortener', 'obfuscate_remote_addr'],
|
||||||
];
|
];
|
||||||
private const SIMPLIFIED_CONFIG_SIDE_EFFECTS = [
|
private const SIMPLIFIED_CONFIG_SIDE_EFFECTS = [
|
||||||
'delete_short_url_threshold' => [
|
'delete_short_url_threshold' => [
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ class SimplifiedConfigParserTest extends TestCase
|
|||||||
'mercure_public_hub_url' => 'public_url',
|
'mercure_public_hub_url' => 'public_url',
|
||||||
'mercure_internal_hub_url' => 'internal_url',
|
'mercure_internal_hub_url' => 'internal_url',
|
||||||
'mercure_jwt_secret' => 'super_secret_value',
|
'mercure_jwt_secret' => 'super_secret_value',
|
||||||
|
'obfuscate_remote_addr' => false,
|
||||||
];
|
];
|
||||||
$expected = [
|
$expected = [
|
||||||
'app_options' => [
|
'app_options' => [
|
||||||
@@ -92,6 +93,7 @@ class SimplifiedConfigParserTest extends TestCase
|
|||||||
'https://third-party.io/foo',
|
'https://third-party.io/foo',
|
||||||
],
|
],
|
||||||
'default_short_codes_length' => 8,
|
'default_short_codes_length' => 8,
|
||||||
|
'obfuscate_remote_addr' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'delete_short_urls' => [
|
'delete_short_urls' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user