Ver Fonte

Set peerid cookie with SameSite=None; Secure

Paul Szymanski há 4 anos atrás
pai
commit
26fd1aade3
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      server/index.js

+ 1 - 1
server/index.js

@@ -26,7 +26,7 @@ class SnapdropServer {
     _onHeaders(headers, response) {
         if (response.headers.cookie && response.headers.cookie.indexOf('peerid=') > -1) return;
         response.peerId = Peer.uuid();
-        headers.push('Set-Cookie: peerid=' + response.peerId);
+        headers.push('Set-Cookie: peerid=' + response.peerId + "; SameSite=Strict; Secure");
     }
 
     _onMessage(sender, message) {