this.cookies.set() cannot set cookie to chrome correctly
See original GitHub issueI came across a strange scene.
In the entry js file:
app.use(function*(next) {
this.cookies.set('test', 999999);
return yield next;
})
This is ok in both HTTP Response Header and Chrome Devtool Resources 's Cookies.
But…
When I put the this.cookies.set
to Get Reponser
app.get('/v1/test', function *(next) {
this.cookies.set('test1', 66666);
this.body = { code: 200, message: 'success'}
return yield next;
})
The HTTP Reponse Header is ok
Set-Cookie: test1=66666; path=/; httponly
The Chrome Devtool Resources’s Cookies display no cookie !
I have debugg this for long time, please help me ~
Issue Analytics
- State:
- Created 8 years ago
- Comments:21 (9 by maintainers)
Top Results From Across the Web
Why Chrome can't set cookie
I have a response from my server. Response Headers contains a valid Set-Cookie. Chrome Response/Cookies says ...
Read more >Turn cookies on or off - Computer - Google Account Help
On your computer, open Chrome. · At the top right, click More More and then Settings. · Under "Privacy and security," click Site...
Read more >7 Keys to the Mystery of a Missing Cookie
Solution tip: Change the code where you are setting the cookie to set the Domain attribute accordingly. 6. Cookie Name is Prefixed with...
Read more >Set-Cookie - HTTP - MDN Web Docs
To send multiple cookies, multiple Set-Cookie headers should be sent ... cannot set cookies with the Secure attribute (since Chrome 52 and ...
Read more >How do I view, add or edit Cookies in Google Chrome?
@s3m3n If you want to change an HttpOnly cookie without using third party plugins, you can first use the Resources tab to delete...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@freestyle21 I think you need this https://github.com/github/fetch#sending-cookies
@freestyle21 @dead-horse I think the issue aims at
receiving
cookies problem, notsending
. If i’m wrong, correct me.