@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
at upstream/main 22 lines 507 B view raw
1<?php 2 3abstract class AphrontHTMLResponse extends AphrontResponse { 4 5 public function getHeaders() { 6 $headers = array( 7 array('Content-Type', 'text/html; charset=UTF-8'), 8 ); 9 try { 10 $cdn = PhabricatorEnv::getEnvConfig('security.alternate-file-domain'); 11 } catch (Throwable $ex) { 12 $cdn = null; 13 } 14 if ($cdn) { 15 $headers[] = array('Link', '<'.$cdn.'>; rel="preconnect"'); 16 } 17 18 $headers = array_merge(parent::getHeaders(), $headers); 19 return $headers; 20 } 21 22}