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

set session.same_site from config/sessions.php #437

Closed
wants to merge 1 commit into from

Conversation

0x1stvan
Copy link

This change involves enabling developers to set the "same_site" inside the "config/sessions.php" file. This feature will be particularly useful during local development when the backend and frontend are running on different ports on localhost, and the session cannot be set due to the "same_site" attribute being set to "lax". By allowing developers to modify the "same_site" attribute via the configuration file, they can overcome this issue.

Example:

config/session.php:
'same_site' => 'none'

Request sent from http://localhost:3000 (vue) to http://localhost:8000 (laravel)

lax_error

After this change:

image

@driesvints
Copy link
Member

This could potentially impact apps that have that setting configured and don't expect their sanctum behavior to change.

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.

None yet

3 participants