0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00

🐛 Change default referrer policy (#7240)

closes #7235

Changes the default referrer policy to `no-referrer-when-downgrade` because Safari can't deal with `origin-when-crossorigin`.
This commit is contained in:
Aileen Nowak 2016-08-22 11:20:56 +02:00 committed by Katharina Irrgang
parent ea099af854
commit 18eda54cf0
2 changed files with 3 additions and 3 deletions

View file

@ -81,7 +81,7 @@ function ghost_head(options) {
context = this.context ? this.context[0] : null,
useStructuredData = !config.isPrivacyDisabled('useStructuredData'),
safeVersion = this.safeVersion,
referrerPolicy = config.referrerPolicy ? config.referrerPolicy : 'origin-when-cross-origin';
referrerPolicy = config.referrerPolicy ? config.referrerPolicy : 'no-referrer-when-downgrade';
return getClient().then(function (client) {
if (context) {

View file

@ -83,7 +83,7 @@ describe('{{ghost_head}} helper', function () {
).then(function (rendered) {
should.exist(rendered);
rendered.string.should.match(/<link rel="canonical" href="http:\/\/testurl.com\/" \/>/);
rendered.string.should.match(/<meta name="referrer" content="origin-when-cross-origin" \/>/);
rendered.string.should.match(/<meta name="referrer" content="no-referrer-when-downgrade" \/>/);
rendered.string.should.match(/<meta property="og:site_name" content="Ghost" \/>/);
rendered.string.should.match(/<meta property="og:type" content="website" \/>/);
rendered.string.should.match(/<meta property="og:title" content="Ghost" \/>/);
@ -135,7 +135,7 @@ describe('{{ghost_head}} helper', function () {
).then(function (rendered) {
should.exist(rendered);
rendered.string.should.match(/<link rel="canonical" href="http:\/\/testurl.com\/about\/" \/>/);
rendered.string.should.match(/<meta name="referrer" content="origin-when-cross-origin" \/>/);
rendered.string.should.match(/<meta name="referrer" content="no-referrer-when-downgrade" \/>/);
rendered.string.should.match(/<meta property="og:site_name" content="Ghost" \/>/);
rendered.string.should.match(/<meta property="og:type" content="website" \/>/);
rendered.string.should.match(/<meta property="og:title" content="About" \/>/);