public static function setTrustedHosts(array $hostPatterns) {

		self::$trustedHostPatterns = array_map(function ($hostPattern) {
			return sprintf('#%s#i', $hostPattern);
		}, $hostPatterns);

		self::$trustedHosts = [];

	}