mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 09:43:13 +08:00
Added option for enable/disable URL Validation by response status code.
This commit is contained in:
@@ -42,7 +42,14 @@ class UrlShortenerConfigCustomizerPlugin extends AbstractConfigCustomizerPlugin
|
||||
'Character set for generated short codes (leave empty to autogenerate one)',
|
||||
null,
|
||||
true
|
||||
) ?: str_shuffle(UrlShortener::DEFAULT_CHARS)
|
||||
) ?: str_shuffle(UrlShortener::DEFAULT_CHARS),
|
||||
'VALIDATE_URL' => $this->questionHelper->ask(
|
||||
$input,
|
||||
$output,
|
||||
new ConfirmationQuestion(
|
||||
'<question>Do you want to validate long urls by 200 HTTP status code on response (Y/n):</question>'
|
||||
)
|
||||
)
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,6 +189,7 @@ final class CustomizableAppConfig implements ArraySerializableInterface
|
||||
'SCHEMA' => $urlShortener['domain']['schema'],
|
||||
'HOSTNAME' => $urlShortener['domain']['hostname'],
|
||||
'CHARS' => $urlShortener['shortcode_chars'],
|
||||
'VALIDATE_URL' => $urlShortener['validate_url'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -240,6 +241,7 @@ final class CustomizableAppConfig implements ArraySerializableInterface
|
||||
'hostname' => $this->urlShortener['HOSTNAME'],
|
||||
],
|
||||
'shortcode_chars' => $this->urlShortener['CHARS'],
|
||||
'validate_url' => $this->urlShortener['VALIDATE_URL']
|
||||
],
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user