From 365e1aab1230a2e48a0d979cce1b86a61b4c16b7 Mon Sep 17 00:00:00 2001 From: ashersaupingomez Date: Sat, 11 Apr 2020 18:18:02 +1000 Subject: [PATCH] fix: attach cookies to agent after plugin is used --- 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);