Automatically strip trailing slash and scheme from LetsEncrypt domains.

This commit is contained in:
Buster Neece 2022-10-23 02:26:47 -05:00
parent 4497eab1f8
commit 56d30207d4
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
1 changed files with 15 additions and 0 deletions

View File

@ -1050,6 +1050,21 @@ class Settings implements Stringable
public function setAcmeDomains(?string $acme_domains): void
{
if (null !== $acme_domains) {
$acme_domains = implode(
', ',
array_map(
static function ($str) {
$str = trim($str);
$str = trim($str, '/');
$str = str_replace(['http://', 'https://'], '', $str);
return $str;
},
explode(',', $acme_domains)
)
);
}
$this->acme_domains = $acme_domains;
}