0
I’m having a problem on my site made in Laravel, it happens the following my application in Laravel is not returning the session Token that would be {{ csrf_token() }}
when I execute an action as register or log in it returns me the following error:
This error happens only on the production server, trying to resolve ended up identifying that when I am accessing the site on the production server the client does not receive the session token that should be in cookies as in the images below:
Token of the developing session: Token of the production session: As you can see, it is as if the application does not return the session token on the production server, even so it is sent a token in the request that is different from the one generated by the application and generates the error that I reported above.
Below my session settings on file .env SESSION_DRIVER=file
My Session.php
<?php
return [
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => 120,
'expire_on_close' => false,
'encrypt' => false,
'files' => storage_path('framework/sessions'),
'connection' => null,
'table' => 'sessions',
'lottery' => [2, 100],
'cookie' => 'laravel_session',
'path' => '/',
'domain' => null,
'secure' => false,
];
If anyone has ever been through this or knows anything about it that might help.
Thank you in advance for your attention.