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

Store fides_consent cookie on the root domain of the Privacy Center #2071

Merged
merged 2 commits into from
Dec 17, 2022

Conversation

NevilleS
Copy link
Contributor

@NevilleS NevilleS commented Dec 17, 2022

Closes #2070

Code Changes

  • Calculate the root domain (based on window.location)
  • Save the cookie using the root domain

Steps to Confirm

  • Ran nox -s test_env and confirmed cookie still writes out unchanged
  • Deploy privacy center to a subdomain and test

Pre-Merge Checklist

Description Of Changes

This has one major issue, which is that it'll only work for "normal" TLDs like ".com", ".co", etc., but will calculate the root domain incorrectly for sites that use second-level domains like "example.co.uk" or "example.co.jp", etc.

@NevilleS NevilleS changed the title Set fides_consent to the root domain of the privacy center Set fides_consent cookie to the root domain of the privacy center Dec 17, 2022
@NevilleS NevilleS changed the title Set fides_consent cookie to the root domain of the privacy center Store fides_consent cookie on the root domain of the Privacy Center Dec 17, 2022
@NevilleS NevilleS merged commit 8b0b6a5 into main Dec 17, 2022
@NevilleS NevilleS deleted the ns-2070-fides-consent-cookie-root-domain branch December 17, 2022 21:37
NevilleS added a commit that referenced this pull request Dec 22, 2022
I updated the CHANGELOG wrong in #2071, since the release branch was already active. Sorry!
@NevilleS NevilleS mentioned this pull request Dec 22, 2022
8 tasks
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

Successfully merging this pull request may close these issues.

Fides consent cookie should be written to the root domain
2 participants