mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-21 22:54:53 +08:00
Set peerid cookie with SameSite=None; Secure
This commit is contained in:
@@ -26,7 +26,7 @@ class SnapdropServer {
|
|||||||
_onHeaders(headers, response) {
|
_onHeaders(headers, response) {
|
||||||
if (response.headers.cookie && response.headers.cookie.indexOf('peerid=') > -1) return;
|
if (response.headers.cookie && response.headers.cookie.indexOf('peerid=') > -1) return;
|
||||||
response.peerId = Peer.uuid();
|
response.peerId = Peer.uuid();
|
||||||
headers.push('Set-Cookie: peerid=' + response.peerId);
|
headers.push('Set-Cookie: peerid=' + response.peerId + "; SameSite=Strict; Secure");
|
||||||
}
|
}
|
||||||
|
|
||||||
_onMessage(sender, message) {
|
_onMessage(sender, message) {
|
||||||
|
|||||||
Reference in New Issue
Block a user