changed use-cookies to disable-cookies

This commit is contained in:
lohit 2024-11-21 17:53:09 +05:30 committed by GitHub
parent 9d4246d74b
commit 6d8cc38946
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -180,7 +180,7 @@ const runSingleRequest = async function (
}
//set cookies if enabled
if (options.useCookies) {
if (!options.disableCookies) {
const cookieString = getCookieStringForUrl(request.url);
if (cookieString && typeof cookieString === 'string' && cookieString.length) {
request.headers['cookie'] = cookieString;
@ -231,7 +231,7 @@ const runSingleRequest = async function (
response.headers.delete('request-duration');
//save cookies if enabled
if (options.useCookies) {
if (!options.disableCookies) {
saveCookies(request.url, response.headers);
}
} catch (err) {