Skip to content

Commit

Permalink
feat: add secure cookie override for agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Eladio Mora committed Oct 3, 2019
1 parent 910a111 commit 2e1e35d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function TestAgent(app, options) {
this._ca = options.ca;
this._key = options.key;
this._cert = options.cert;
this._secureCookie = options.secureCookie;
}
Agent.call(this);
this.app = app;
Expand All @@ -54,6 +55,7 @@ methods.forEach(function(method) {
req.ca(this._ca);
req.cert(this._cert);
req.key(this._key);
req.secureCookie(this._secureCookie);

req.on('response', this._saveCookies.bind(this));
req.on('redirect', this._saveCookies.bind(this));
Expand Down

0 comments on commit 2e1e35d

Please sign in to comment.