Fork me on GitHub
#reagent
<
2020-02-26
>
Shima19:02:56

Hi everyone I'm trying to set a cookie on my spa with reagent.cookies when I use (set! :token my-token {:max-age "60"}) everything works fine but when I try to add the domain to my cookie (`(set! :token my-token {:max-age "60" :domain "http://localhost:3000"})`) something went wrong and reagent.cookies/count return zero ... any suggestion?

lwhorton19:02:04

path and domain are pretty finicky with browsers in general, reagent aside

👍 4
lwhorton19:02:32

for a long while cookies couldnt be set to localhost, and that might still actually be the case (for chrome). there are special security rules that browsers follow before allowing cookies to be set and sent, too. i would guess these are your issue and not actually reagent

👍 4