Skip to content

Commit

Permalink
Set user-token cookie's secure=false
Browse files Browse the repository at this point in the history
Cloudflare isn't propagating correctly the cookie with secure=true.
Potentially due to us using http for now and not https.
  • Loading branch information
dalebezolli committed Dec 8, 2024
1 parent 8f4dcf0 commit 2cb7130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Middleware/EnsureUserTokenExistence.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class EnsureUserTokenExistence {
*/
public function handle(Request $request, Closure $next): Response {
if(is_null($request->cookie('user-token'))) {
Cookie::queue(cookie('user-token', Str::uuid(), secure: true, httpOnly: false, minutes: 100000000, path: '/'));
Cookie::queue(cookie('user-token', Str::uuid(), httpOnly: false, minutes: 100000000, path: '/'));
}

return $next($request);
Expand Down

0 comments on commit 2cb7130

Please sign in to comment.