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

Default value for SECURE_REFERRER_POLICY in Django 3.1 breaks Clicky #184

Open
jcassee opened this issue Jan 21, 2021 · 2 comments
Open

Comments

@jcassee
Copy link
Collaborator

jcassee commented Jan 21, 2021

Django 3.1 has a new default SECURE_REFERRER_POLICY value of same-origin, which hides the referrer from third party sources like Clicky. Clicky depends on the referrer (which, relative to the beacon, is the domain running Django) for domain validation. This breaks the integration by default. See:

https://docs.djangoproject.com/en/3.1/ref/middleware/#referrer-policy
https://clicky.com/help/faq/tips/different/domain-validation

Based on my understanding of the Referrer-Policy header documentation, I think these SECURE_REFERRER_POLICY values will break the Clicky integration:

  • no-referrer
  • same-origin

Unfortunately for Clicky, the default setting is same-origin since Django 3.1.

I think we should:

  • Update the Clicky documentation to note that you need to set SECURE_REFERRER_POLICY to any of the supported values.
  • Output a warning if Clicky tags are used and SECURE_REFERRER_POLICY has been set to a value that breaks the integration.
@Diemon-zp
Copy link

Yes, just faced with this issue in Django 4.2.1.
Set SECURE_REFERRER_POLICY = None

@bittner
Copy link
Member

bittner commented Sep 28, 2023

PR anyone?

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

3 participants