question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting cookie options

See original GitHub issue

Upon pushing to a staging server I get an issue that I did not get at localhost. The cookie saved gives me the following console warning:

Cookie “strapi_jwt” will be soon rejected because it has the “SameSite” attribute set to “None” or an invalid value, without the “secure” attribute. To know more about the “SameSite“ attribute, read https://developer.mozilla.org/docs/Web/HTTP/Headers/Set-Cookie/SameSite

How to change the value of SameSite in the cookie?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
dubem-designcommented, Jan 9, 2021

Please also expose options to set “TOKEN_KEY” name, one might not want to use “strapi_jwt”

0reactions
adamkhancommented, May 10, 2021

Turns out the problem was using nuxt-fontawesome instead of @nuxtjs/fontawesome! I’ve no idea why but making this change solved the issue, at least for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Set-Cookie - HTTP - MDN Web Docs
The Set-Cookie HTTP response header is used to send a cookie from the server to the user agent, so that the user agent...
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 >
Cookies, document.cookie - The Modern JavaScript Tutorial
Cookies have several options, many of them are important and should be set. The options are listed after key=value , delimited by ; ......
Read more >
JavaScript Cookies - W3Schools
JavaScript can create, read, and delete cookies with the document.cookie property. ... If you set a new cookie, older cookies are not overwritten....
Read more >
How to Set Cookie and Update Cookie with JavaScript - Tabnine
setCookie function ; username = 'Max Brown'; ; // Set a Cookie ; function setCookie(cName, cValue, expDays) { ; let date = new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found