Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for thereferrer meta tag #210

Open
molefrog opened this issue Apr 9, 2020 · 0 comments
Open

Support for thereferrer meta tag #210

molefrog opened this issue Apr 9, 2020 · 0 comments

Comments

@molefrog
Copy link

molefrog commented Apr 9, 2020

Hi, first of all, thanks for the gem — our team has been using it for ages and we find it super helpful!

There is a meta tag called referrer (see Integration with HTML section) that is supported by modern browsers and allows to customize the Referrer policy. Why it may sound like this is something you wouldn't need very often, but the Referrer policy could be quite important from the security point of view.

A use case is the following: say you have an app that allows users to share their data via a unique secret link. Like a Google Doc accessible via a link, like your-app.com/link/103f133eded. You obviously want to keep the URL in secret, however, under regular circumstances browsers do attach the full URL into the request. This may lead to a situation when a request is made to third-party websites (like analytics) with the secret link included in the request. In order to restrict that your app could set the Referrer-Policy: same-origin header. Or, you can include it as a part of your HTML:

<meta name="referrer" content="same-origin">

Let me know what you think about adding this to the library, would love to assist and collaborate.

@molefrog molefrog changed the title Support for referrer meta tag Support for thereferrer meta tag Apr 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant