alxndr's blog

Notes and other stuff...

by Alexander

hapi — unset a cookie

07 Aug 2017

…because the documentation for Hapi is awful:

If you’re trying to reply().unstate("cookiename") and it Just Won’t Work, look for how you set that cookie. If you used reply().state("cookiename", value, cookieOptions), you need to include those cookieOptions when you try to unset: reply().unstate("cookiename", cookieOptions) should work.