gadicc / meteor-headers

Access HTTP headers on both server and client. Client IP with proxy support.
https://atmospherejs.com/gadicohen/headers
GNU Lesser General Public License v3.0
61 stars 21 forks source link

[Critical] Meteor.call gets most recent headers, not headers for current connection #4

Closed gadicc closed 10 years ago

gadicc commented 10 years ago

There is a global headers object on the server which gets set each time a client connects. However, this is global, and gets changed with every new client connection.

The Meteor.call('getReqHeaders') is therefore actually fetching the most recent headers, and not necessarily the headers for the current connection (if another client connected before then, which is very likely on popular sites).

We can store the headers per connection, but we currently have no way to associate a Meteor.method with a particular connection. It's critical that we investigate other ways of doing this or put in a feature request to MDG.

gadicc commented 10 years ago

Solved with new method in 0.0.8.