Set Client-Side Accessible Cookie In Express

后端 未结 3 1372
借酒劲吻你
借酒劲吻你 2021-01-30 21:56

I\'m working on a Node app that uses Express and SocketIO. I want to set a cookie in my Express controller which is then accessible from my client-side Javascript code. Everythi

3条回答
  •  余生分开走
    2021-01-30 22:31

    so to access in http can we use:

    res.cookie("mycookie", "1234567890", { secure:false, maxAge:120000, httpOnly: true });?
    

提交回复
热议问题