Changeset View
Changeset View
Standalone View
Standalone View
src/configuration/ArcanistBlindlyTrustHTTPEngineExtension.php
Show All 9 Lines | final class ArcanistBlindlyTrustHTTPEngineExtension | ||||
public function setDomains(array $domains) { | public function setDomains(array $domains) { | ||||
foreach ($domains as $domain) { | foreach ($domains as $domain) { | ||||
$this->domains[phutil_utf8_strtolower($domain)] = true; | $this->domains[phutil_utf8_strtolower($domain)] = true; | ||||
} | } | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getExtensionName() { | public function getExtensionName() { | ||||
return pht('Arcanist HTTPS Trusted Domains'); | return pht('HTTPS Trusted Domains'); | ||||
} | } | ||||
public function shouldTrustAnySSLAuthorityForURI(PhutilURI $uri) { | public function shouldTrustAnySSLAuthorityForURI(PhutilURI $uri) { | ||||
$domain = $uri->getDomain(); | $domain = $uri->getDomain(); | ||||
$domain = phutil_utf8_strtolower($domain); | $domain = phutil_utf8_strtolower($domain); | ||||
return isset($this->domains[$domain]); | return isset($this->domains[$domain]); | ||||
} | } | ||||
} | } |