V
V
Vitaly2019-05-12 20:50:18
Node.js
Vitaly, 2019-05-12 20:50:18

How to set cookies in socket.io?

I'm trying to set up authentication through socket.io. I ran into a problem that cookies can be obtained upon connection (handshake.headers), but it is not clear how to set the identifier in response to an empty value. The stackoverflow bikes suggest setting cookies on the client, but that doesn't allow you to set the required httpOnly flag. How is it properly done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Chernyshev, 2019-05-15
@vitali1995

Can set cookies via http, before handshake in response to any request

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question