From 4babc5d6ac7a7c28fb829697eb02e3f7d72f2b1c Mon Sep 17 00:00:00 2001 From: Asher Gomez Date: Sun, 28 Jun 2020 13:18:03 +1000 Subject: [PATCH] fix: attach cookies to agent after plugin is used (#1556) --- src/node/agent.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/agent.js b/src/node/agent.js index 7aa5fd037..50b5448fc 100644 --- a/src/node/agent.js +++ b/src/node/agent.js @@ -94,8 +94,8 @@ methods.forEach(name => { req.on('response', this._saveCookies.bind(this)); req.on('redirect', this._saveCookies.bind(this)); req.on('redirect', this._attachCookies.bind(this, req)); - this._attachCookies(req); this._setDefaults(req); + this._attachCookies(req); if (fn) { req.end(fn);