0

Some background:

  • my site: site.domain.com
  • http-only cookie set by domain.com.
  • I can see the cookie in the resources view in Chrome & in the network traffic

I really need read access to an http-only (domain) cookie from either meteor client or server (doesnt matter to me)

http-only renders any technique that uses "document.cookie" useless unfortunately.

I can see the cookie details being passed back to Meteor inside the various sockjs GET requests, what i probably need is a way to get at that raw request info so i can tease out the cookie value.

Anyone have any ideas? Thanks in advance

4

1 回答 1

0

看看尝试通过 req 或使用 connect 的 cookieparser 访问标头:

服务器 Js

__meteor_bootstrap__.app.use(connect.cookieParser()).use(function(req, res, next) {
    Fiber(function () {
        console.log(JSON.stringify(req.cookies));
    }).run();
});

看看:https ://groups.google.com/forum/?fromgroups=#!topic/meteor-talk/xLGOcruZ4c4了解更多信息

于 2013-03-13T09:49:27.610 回答