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

Is there a way to disable referrer? #976

Closed
Gerard64 opened this issue Feb 2, 2025 · 5 comments
Closed

Is there a way to disable referrer? #976

Gerard64 opened this issue Feb 2, 2025 · 5 comments

Comments

@Gerard64
Copy link

Gerard64 commented Feb 2, 2025

Is there a way to disable referrer?
My domain name is resolvable locally but also on the public internet.

I assume wen i click on a link in Linkding the server on the other side will see the referrer.
If so can this be disabled?

@FireFingers21
Copy link

You should be able to customize the Django Referrer Policy settings using the SECURE_REFERRER_POLICY environment variable using the method described in Issue #960.

I did this myself, although I used it with the CSRF_COOKIE_SECURE variable to enforce HTTPS on linkding's browser cookies.

@Gerard64
Copy link
Author

@FireFingers21

Thank you, for your advise and links.
I am going to study this and test it.

@huyz
Copy link

huyz commented Feb 11, 2025

@Gerard64 please post the details of your solution if you figure it out

@Gerard64
Copy link
Author

Gerard64 commented Feb 11, 2025

The default referrer-policy header of linkding is set to same-origin.

Image

When i click on a bookmark to a webserver i manage i see there is no referrer back to my linkding system.
In one of the links of @FireFingers21 i read this:

Image

I think this says exactly what i see with my test and what i want. Remote sites can not see where i am coming from.

When i click on a link of linkding itself inside for example the setup page then i do see a referrer to linkding in the logs of my apache proxy server.

So for me personally referrer-policy: same-origin is great and good as it is.

@sissbruecker
Copy link
Owner

Referrer should already be disabled for outgoing links with the Referrer-Policy HTTP header.

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

4 participants