geut / discovery-swarm-webrtc

discovery-swarm for WebRTC
MIT License
94 stars 23 forks source link

Add command line flag to disable cookies #17

Open sammacbeth opened 4 years ago

sammacbeth commented 4 years ago

When running the discovery-swarm-webrtc server, the socket.io defaults set a cookie. These cookies, however, do not set samSite flags, causing warnings in modern browsers:

Screenshot 2020-04-24 at 17 59 21

This PR makes two changes:

  1. Add a --no-cookie option to the command line interface, that stops socket.io from setting cookies.
  2. Updates to a newer version of socket.io, which in turn uses a version of engine.io that sets cookies with sameSite=strict, which will suppress browser warnings: https://github.com/socketio/engine.io/releases/tag/3.4.1