Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cookies = cookies.filter(cookie => Tough.domainMatch(identifier.domain, cookie.domain));
return cookies
cookies.forEach(function (cookie) {
if (cookie.is_secure && !isSecure) {
return;
}
if (!tough.domainMatch(host, cookie.host_key, true)) {
return;
}
if (!tough.pathMatch(path, cookie.path)) {
return;
}
validCookies.push(cookie);
});
const cookieMatches = (cookie: CyCookie, data) => {
if (data.domain && !tough.domainMatch(cookie.domain, data.domain)) {
return false
}
if (data.path && !tough.pathMatch(cookie.path, data.path)) {
return false
}
if (data.name && data.name !== cookie.name) {
return false
}
return true
}