- added more missing type-hints (checked them in body of the method)
- reformatted code a little (code-style)
- moved '/.well-known/host-meta' to constant Probe::HOST_META
This commit is contained in:
Roland Häder 2022-10-25 20:22:19 +02:00
parent a7e9457ef2
commit 5306bb3e31
No known key found for this signature in database
GPG key ID: C82EDE5DDFA0BA77
4 changed files with 101 additions and 64 deletions

View file

@ -1325,7 +1325,7 @@ class GServer
private static function validHostMeta(string $url): bool
{
$xrd_timeout = DI::config()->get('system', 'xrd_timeout');
$curlResult = DI::httpClient()->get($url . '/.well-known/host-meta', HttpClientAccept::XRD_XML, [HttpClientOptions::TIMEOUT => $xrd_timeout]);
$curlResult = DI::httpClient()->get($url . Probe::HOST_META, HttpClientAccept::XRD_XML, [HttpClientOptions::TIMEOUT => $xrd_timeout]);
if (!$curlResult->isSuccess()) {
return false;
}