fix(1102): silently ignore invalid cookie

This commit is contained in:
r.bideau 2023-11-21 20:59:51 +01:00
parent 3f80a4dfa2
commit 531426b0a6

View File

@ -5,7 +5,9 @@ const cookieJar = new CookieJar();
const addCookieToJar = (setCookieHeader, requestUrl) => {
const cookie = Cookie.parse(setCookieHeader, { loose: true });
cookieJar.setCookieSync(cookie, requestUrl);
cookieJar.setCookieSync(cookie, requestUrl, {
ignoreError: true // silently ignore things like parse errors and invalid domains
});
};
const getCookiesForUrl = (url) => {