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

Add cookie domain configuration under system.session #2040

Closed
wants to merge 1 commit into from

Conversation

MaxEvan
Copy link

@MaxEvan MaxEvan commented May 30, 2018

I have added a new config under "system.session" called "domain".

The current implementation is

$domain = $uri->host();
if ($domain === 'localhost') {
    $domain = '';
}

This is problematic under docker-compose because the hostname is the name of the container/service. In our case, it was forcing the cookie domain to be "domain=grav-site;".

Basically, under docker, the only way to make it work would be to use "localhost", but that would break a lot of stuff.

This setting allows override of the domain, and it shouldn't break existing applications.

Copy link
Member

@mahagr mahagr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will break multisite setups and may have side effects on sites without session domain being set.

mahagr added a commit that referenced this pull request Feb 10, 2021
@mahagr
Copy link
Member

mahagr commented Feb 10, 2021

Implemented in above commit.

@mahagr mahagr closed this Feb 10, 2021
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.

2 participants