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

Manually define cookie domain #205

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Manually define cookie domain #205

wants to merge 4 commits into from

Commits on Dec 28, 2023

  1. Configuration menu
    Copy the full SHA
    1d01ca0 View commit details
    Browse the repository at this point in the history

Commits on Dec 29, 2023

  1. make COOKIE_DOMAIN a property on the config object

    we can be smart and just derive the cookie domain (which is the most
    specific available shared subdomain of the api and frontend) by parsing
    the api host name and frontend host name and working out the subdomain
    hierarchy there.
    
    This has the advantage of us not needing to thing about domain structure
    when setting up the configuration - rather we can just pass in the full
    hostnames of the apps, which we're more likely to have available rather
    than the nebulous concept of a shared domain which varies wildly based
    on running locally vs on paas/on ecs.
    
    This function splits the host name by dot, (so
    download.documents.service.gov.uk becomes ["uk", "gov", "service",
    "documents", "download"]) and then loops through both api and frontend
    at the same time.
    leohemsted committed Dec 29, 2023
    Configuration menu
    Copy the full SHA
    8a8ac23 View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2024

  1. add tests

    note that patching os environ is pretty tough because it's read at
    import time by config, so just patch the values on the config object
    itself
    leohemsted committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    5cfc209 View commit details
    Browse the repository at this point in the history

Commits on Jan 9, 2024

  1. dont pass SERVER_NAME env var in

    it's got the same function as the frontend hostname, but is only used on
    dev.
    
    note this needs a matching change to notifications-local
    leohemsted committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    c6fccce View commit details
    Browse the repository at this point in the history