How can I send something from client to the server in every request?

Hello, I need to send something from the client to the server in every request, actually, I need the information on the WebSocket connection.

As far as I understand Meteor removes the cookies then I can’t use them.

Is there any way to attach something to the httpHeaders in the connection object? I want to set this value on client startup phase.

Any other idea?

The information that I want to send is what is the Cordova App running in this connection because I have one Cordova App (on Stores) per tenant and I need to know the current tenant.

More info about this object here:

How about encapsulating the Meteor.call and Meteor.subscribe functions to a new function which automatically adds the value to the inputs to Meteor.call and Meteor.subscribe calls?

2 Likes