Skip to content

Instantly share code, notes, and snippets.

@jedimdan
jedimdan / SameSiteNone.php
Last active June 21, 2021 09:19
A Laravel middleware that will set cookies to SameSite=None and account for incompatible clients. Note that it relies on https://github.com/jenssegers/agent as a dependency
<?php
namespace App\Http\Middleware;
use Closure;
use Jenssegers\Agent\Agent;
class SameSiteNone
{
/**
@jedimdan
jedimdan / RememberMeCookieFix.php
Last active August 10, 2018 09:01
A middleware that finds a bad remember me cookie and removes it. Temp fix while we wait for fix for 5.5.42. To be put at the top of kernel.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Auth\SessionGuard;
use Illuminate\Contracts\Encryption\Encrypter;
class RememberMeCookieFix
{
@jedimdan
jedimdan / keybase.md
Created August 27, 2015 02:30
Keybase Verification

Keybase proof

I hereby claim:

  • I am jedimdan on github.
  • I am danieltsou (https://keybase.io/danieltsou) on keybase.
  • I have a public key whose fingerprint is 5F54 DC87 7E34 95DD F716 1C4A 897C C0D5 D2E8 A003

To claim this, I am signing this object: