Skip to content

Commit ac9bc84

Browse files
committed
Merge branch 'release/7.50.0'
2 parents 4177ff2 + edb252b commit ac9bc84

File tree

10 files changed

+488
-6
lines changed

10 files changed

+488
-6
lines changed

CHANGELOG.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
7.50.0:
2+
date: 2025-11-06
3+
new features:
4+
- GH-1534 Add support for disabling cookie jar via requester options
5+
16
7.49.1:
27
date: 2025-10-30
38
chores:

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ runner.run(collection, {
8585
// jar.allowProgrammaticAccess = function (domain) { return domain === 'postman-echo.com'; };
8686
cookieJar: jar,
8787

88+
// Prevents cookie jar from being used for in a request
89+
disableCookies: false,
90+
8891
// Controls redirect behavior (only supported on Node, ignored in the browser)
8992
followRedirects: true,
9093

docs/protocol-profile-behavior.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Follow HTTP 3xx responses as redirects.
1515
- `maxRedirects: Number`<br/>
1616
Set maximum number of redirects to follow.
1717

18+
- `disableCookies: Boolean`<br/>
19+
Prevent cookie jar from being used in a request.
20+
1821
- `disableBodyPruning: Boolean`<br/>
1922
Control request body pruning for following methods: ```GET, COPY, HEAD, PURGE, UNLOCK```
2023

lib/requester/core.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ var dns = require('dns'),
8585
removeRefererHeader: 'removeRefererHeaderOnRedirect',
8686

8787
// Select the HTTP protocol version to be used. Valid options are http1/http2/auto
88-
protocolVersion: 'protocolVersion'
88+
protocolVersion: 'protocolVersion',
89+
90+
// disable cookie jar
91+
disableCookies: 'disableCookies'
8992
},
9093

9194
/**
@@ -484,7 +487,7 @@ module.exports = {
484487
}
485488

486489
// set cookie jar if not disabled
487-
if (!protocolProfileBehavior.disableCookies) {
490+
if (!options.disableCookies) {
488491
options.jar = defaultOpts.cookieJar || true;
489492
}
490493

lib/requester/dry-run.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,11 @@ function dryRun (request, options, done) {
316316
implicitCacheControl = options.implicitCacheControl,
317317
implicitTraceHeader = options.implicitTraceHeader,
318318
disabledSystemHeaders = _.get(options.protocolProfileBehavior, 'disabledSystemHeaders') || {},
319-
disableCookies = _.get(options.protocolProfileBehavior, 'disableCookies');
319+
320+
// TODO: Unify the logic to read ppb properties with core.js
321+
disableCookies = Object.hasOwn(options.protocolProfileBehavior || {}, 'disableCookies') ?
322+
options.protocolProfileBehavior.disableCookies :
323+
options.disableCookies;
320324

321325
async.waterfall([
322326
function setContentTypeHeader (next) {

lib/requester/requester-pool.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ RequesterPool = function (options, callback) {
2222
keepAlive: _.get(options, 'requester.keepAlive', true),
2323
agents: _.get(options, 'requester.agents'), // http(s).Agent instances
2424
cookieJar: _.get(options, 'requester.cookieJar'), // default set later in this constructor
25+
disableCookies: _.get(options, 'requester.disableCookies', false),
2526
strictSSL: _.get(options, 'requester.strictSSL'),
2627
maxResponseSize: _.get(options, 'requester.maxResponseSize'),
2728
protocolVersion: _.get(options, 'requester.protocolVersion'),

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postman-runtime",
3-
"version": "7.49.1",
3+
"version": "7.50.0",
44
"description": "Underlying library of executing Postman Collections",
55
"author": "Postman Inc.",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)