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

Remove dereferer in browsers that support Referrer-Policy #712

Closed
Daniel15 opened this issue Jun 15, 2021 · 3 comments
Closed

Remove dereferer in browsers that support Referrer-Policy #712

Daniel15 opened this issue Jun 15, 2021 · 3 comments

Comments

@Daniel15
Copy link
Contributor

Daniel15 commented Jun 15, 2021

  • What do you want to happen?
    In modern browsers, you can send a Referrer-Policy: no-referrer header and it'll block the referrer for all outbound links. This avoids the need to redirect through dereferer.org. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy which has details on the possible values for the header, and browser support. You could do browser detection and use Referrer-Policy for newer browsers, falling back to dereferer for older browsers.

  • If not clear, why do you want it?
    Speeds up connecting to other sites (don't have to wait a few seconds for dereferer to redirect)

  • Do you think it's something only you need or something that might be popular?
    People like stuff being faster 😄

@theotherp
Copy link
Owner

theotherp commented Jun 15, 2021 via email

@Daniel15
Copy link
Contributor Author

I have no idea how to set that header when just providing a link for you to click.

@theotherp The header applies to all links on the page. You'd just have to set it when serving NZBHydra pages. There's a few options:

  • NZBHydra's web server could set the header when rendering the page, and then every link on the page will have its referrer removed.
  • If it's hard for you to add extra headers with whatever framework you're using, you could instead use a meta tag: <meta name="referrer" content="no-referrer"> and it'd apply to every link on the page, similar to setting a header
  • Alternatively, if you only want it to apply to particular links, you can add a referrerpolicy="no-referrer" or rel="noreferrer" to links (eg. <a href="https://example.com/" referrerpolicy="no-referrer">Example</a>)

@theotherp
Copy link
Owner

The HTML page already has a <meta name="referrer" content="no-referrer"> tag and it's already applied:
image

So it looks I already implemented this and just forgot about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants