Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get Cookies #244

Open
abhi-car opened this issue Aug 10, 2022 · 1 comment
Open

Unable to get Cookies #244

abhi-car opened this issue Aug 10, 2022 · 1 comment

Comments

@abhi-car
Copy link

abhi-car commented Aug 10, 2022

Hello Everyone, I have few cookies stored with domain .xxxx.local

when i did

`
const jar = new CookieJar();
const cookies = jar.getCookiesSync('http://xxxx.local');

console.log('cookies', cookies);
const cookies1 = jar.getCookiesSync('http://app.xxxx.local');

console.log('cookies', cookies1);
const cookies2 = jar.getCookiesSync('http://app1.xxxx.local');

console.log('cookies', cookies2);
const cookies3 = jar.getCookiesSync('.xxxx.local');

console.log('cookies', cookies3);

`

I got empty arrays. what is the way to get the cookies.

image

Originally posted by @abhi-car in #85 (comment)

@abhi-car abhi-car changed the title Hello Everyone, I have few cookies stored with domain .xxxx.local. when i did Unable to get Cookies Aug 10, 2022
@colincasey
Copy link
Contributor

colincasey commented Aug 19, 2022

@abhi-car can you include how are you setting the cookie and creating the cookie store? Without seeing that I have to assume that those cookies are not being set because .local is a special-use domain.

See the allowSpecialUseDomain defined in https://github.com/salesforce/tough-cookie#cookiejarstore-options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants