forked from extern/bruno
Merge pull request #1015 from rbideau/bugfix/silently-ignore-invalid-cookie
fix(#1012): silently ignore invalid cookie
This commit is contained in:
commit
ef98eb707c
@ -5,7 +5,9 @@ const cookieJar = new CookieJar();
|
|||||||
|
|
||||||
const addCookieToJar = (setCookieHeader, requestUrl) => {
|
const addCookieToJar = (setCookieHeader, requestUrl) => {
|
||||||
const cookie = Cookie.parse(setCookieHeader, { loose: true });
|
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) => {
|
const getCookiesForUrl = (url) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user