mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Update client.js
This commit is contained in:
parent
8c426553d7
commit
baf99d7e72
@ -49,6 +49,7 @@ Gun.on('out', function (ctx) {
|
||||
var gun = ctx.gun;
|
||||
var opt = ctx.opt || {};
|
||||
var peers = opt.peers || gun.Back('opt.peers');
|
||||
var headers = opt.headers || gun.Back('opt.headers') || {};
|
||||
|
||||
if (!peers) {
|
||||
return;
|
||||
@ -56,8 +57,9 @@ Gun.on('out', function (ctx) {
|
||||
|
||||
var subset = getSocketSubset(peers);
|
||||
|
||||
headers['gun-sid'] = sid;
|
||||
subset.send({
|
||||
headers: { 'gun-sid': sid },
|
||||
headers: headers,
|
||||
body: ctx,
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user