Skip to content

Conversation

@niccolomineo
Copy link
Member

In Safari, in the context of a local environment, there seems to occur a collision between the anti CSRF mechanism and the SESSION_COOKIE_DOMAIN value, for Talos as a tool is intended to be used with a multiple project mentality. Hardcoding the SESSION_COOKIE_DOMAIN as localhost for all projects currently renders ineffective any attempt to log in to any Django admin, but the first Django admin one has ever logged in to, with said browser.

The first solution that comes to mind is to disable SESSION_COOKIE_DOMAIN locally.

@niccolomineo niccolomineo self-assigned this Sep 12, 2024
@niccolomineo niccolomineo changed the title Disable SESSION_COOKIE_DOMAIN in local environment Disable SESSION_COOKIE_DOMAIN in local environment Sep 12, 2024
@trottomv
Copy link
Contributor

trottomv commented Nov 13, 2024

In Safari, in the context of a local environment, there seems to occur a collision between the anti CSRF mechanism and the SESSION_COOKIE_DOMAIN value, for Talos as a tool is intended to be used with a multiple project mentality. Hardcoding the SESSION_COOKIE_DOMAIN as localhost for all projects currently renders ineffective any attempt to log in to any Django admin, but the first Django admin one has ever logged in to, with said browser.

The first solution that comes to mind is to disable SESSION_COOKIE_DOMAIN locally.

I don’t think removing the parametric handling of this setting is ideal. I’ve found it useful in some projects to keep SESSION_COOKIE_DOMAIN configured even locally, as it allows me to test session behaviors across multiple instances. Disabling it entirely could limit that flexibility.

@niccolomineo
Copy link
Member Author

Ok, I will just set it to None in my local environment then.

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.

3 participants