From 3772da7f632e9aa42a28836b11efcf7932fb8ff1 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Sun, 26 Apr 2015 15:55:38 +0000 Subject: [PATCH] Ask browsers to not send referrer for external links --- app/assets/javascripts/application.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 1503e62..f94967c 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -19,4 +19,8 @@ $(function() { $('input[data-behavior=focus]:first').focus().select(); $('[data-toggle="popover"]').popover({ html: true }); + + if ($('meta[name=referrer][content=none]').length > 0) { + $('a[href*=http]').attr('rel', 'noreferrer'); + } });