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

Fixed loading cookies on Linux environments #703

Merged
merged 1 commit into from
Oct 8, 2022

Conversation

BooStudio
Copy link

Hello,

I came across this issue which I could not explain, but my best guess is it's got something to do with the Linux,
where the self.environ.get("HTTP_COOKIE", "") returns the cookie_string which is delimited with ";" whereas on my local Mac environment it returns the cookie_string which is delimited with "; " which creates an issue where the API calls fail as the CSRF tokens doesn't match.

The solution provided in the PR is a better way to handle cookies it's inspired by how Django & Laravel handles cookies and should work for both scenarios.

@josephmancuso josephmancuso changed the title Better way to handle cookie load Fixed loading cookies on Linux environments Oct 8, 2022
@josephmancuso josephmancuso marked this pull request as draft October 8, 2022 18:30
@josephmancuso josephmancuso marked this pull request as ready for review October 8, 2022 18:30
@josephmancuso
Copy link
Member

how was this PR open? Its not running any of the tests for some reason

Copy link
Member

@josephmancuso josephmancuso left a comment

Choose a reason for hiding this comment

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

this looks fine though

@josephmancuso josephmancuso merged commit 8aa2d1a into MasoniteFramework:4.0 Oct 8, 2022
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