mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
Merge pull request #44475 from nextcloud/fix/disabled-ipv6
This commit is contained in:
commit
f8d1487dcd
1 changed files with 3 additions and 1 deletions
|
|
@ -75,7 +75,9 @@ class DnsPinMiddleware {
|
|||
$soaDnsEntry = $this->soaRecord($target);
|
||||
$dnsNegativeTtl = $soaDnsEntry['minimum-ttl'] ?? null;
|
||||
|
||||
$dnsTypes = [DNS_A, DNS_AAAA, DNS_CNAME];
|
||||
$dnsTypes = \defined('AF_INET6') || @inet_pton('::1')
|
||||
? [DNS_A, DNS_AAAA, DNS_CNAME]
|
||||
: [DNS_A, DNS_CNAME];
|
||||
foreach ($dnsTypes as $dnsType) {
|
||||
if ($this->negativeDnsCache->isNegativeCached($target, $dnsType)) {
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue