vendredi 6 juillet 2018

Laravel Cookie converting forward slash to %2f

I am using Laravel 5.6. I am setting a cookie using

->cookie('googtrans', '/en/gb', strtotime("+1 year"));

however the forward slashes are being converted to %2F giving a value of

%2Fen%2Fgb 

In the middleware for EncryptCookies I exclude the cookie 'googtrans'.

If I use the PHP command

setrawcookie('googtrans', '/en/gb', strtotime("+1 year")); 

everything is OK.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire