1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Add meta referrer tag to all pages

Summary: Ref T4342. Puts meta="referrer" on everything.

Test Plan: In Safari, used the Charles http proxy to verify this change actually stops referrers from being sent.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4342

Differential Revision: https://secure.phabricator.com/D8712
This commit is contained in:
epriestley 2014-04-08 05:14:15 -07:00
parent bd0011076b
commit 740fbba961

View file

@ -89,14 +89,22 @@ class PhabricatorBarePageView extends AphrontPageView {
'content' => 'black-translucent' 'content' => 'black-translucent'
)); ));
$referrer_tag = phutil_tag(
'meta',
array(
'name' => 'referrer',
'content' => 'never',
));
$response = CelerityAPI::getStaticResourceResponse(); $response = CelerityAPI::getStaticResourceResponse();
$developer = PhabricatorEnv::getEnvConfig('phabricator.developer-mode'); $developer = PhabricatorEnv::getEnvConfig('phabricator.developer-mode');
return hsprintf( return hsprintf(
'%s%s%s%s%s', '%s%s%s%s%s%s',
$viewport_tag, $viewport_tag,
$icon_tag, $icon_tag,
$apple_tag, $apple_tag,
$referrer_tag,
CelerityStaticResourceResponse::renderInlineScript( CelerityStaticResourceResponse::renderInlineScript(
$framebust.jsprintf('window.__DEV__=%d;', ($developer ? 1 : 0))), $framebust.jsprintf('window.__DEV__=%d;', ($developer ? 1 : 0))),
$response->renderResourcesOfType('css')); $response->renderResourcesOfType('css'));