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

[6.0] Keep cookies between redirects #107

Merged
merged 1 commit into from
Oct 14, 2019

Conversation

kotfire
Copy link
Contributor

@kotfire kotfire commented Oct 11, 2019

This pull request makes followRedirects keep the cookies from the response when requesting to the new location.

I think the follow redirects should behave as browsers and all modern browsers keep the cookies after a redirect.

The changes should not break any existing code, but I am open to make it configurable via opt-in.

@driesvints driesvints changed the title Keep cookies between redirects [5.x] Keep cookies between redirects Oct 11, 2019
@driesvints
Copy link
Member

This might be a breaking change if people were expecting cookies not to be kept between redirects.

@kotfire
Copy link
Contributor Author

kotfire commented Oct 11, 2019

Makes sense, what do you think about making it configurable?

I would like to be able to set it to keep cookies for every redirect given this method is being called internally by other methods.

Something like $this->keepCookiesBetweenRedirects() or a shorter name that sets a property and check the property in the followRedirects method. Of course there would be another to disable.

@driesvints
Copy link
Member

Makes sense, what do you think about making it configurable?

Hmm no. I think it's better if this were to be submitted to master instead.

@kotfire kotfire changed the base branch from 5.0 to master October 14, 2019 12:04
@kotfire kotfire changed the title [5.x] Keep cookies between redirects [6.0] Keep cookies between redirects Oct 14, 2019
@taylorotwell taylorotwell merged commit 4ad1c52 into laravel:master Oct 14, 2019
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