Questions tagged [samesite]

Use this tag for questions about errors caused by a browser ignoring a Set-Cookie header—especially for cross-origin requests—due to a SameSite attribute being missing or having a certain value. Also for questions about implementing SameSite in your site's response headers. Consider adding the [cookies] tag too. SameSite instructs browsers to either restrict a cookie to first-party / same-site contexts or allow it in third-party / cross-site contexts.

The SameSite attribute for the Set-Cookie response header instructs browsers to either restrict a cookie to first-party / same-site contexts or allow it in third-party / cross-site contexts.

In your browser devtools console, you may see an error such as the following:

A cookie associated with a cross-site resource at was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure.

For a Set-Cookie response header which lacks the SameSite attribute, browsers are beginning to treat the Set-Cookie response header as if it had a SameSite=Lax attribute — which causes browsers to ignore cookies sent in cross-origin fetch/XHR/axios, etc., requests.

Recent versions of modern browsers provide a more secure default for SameSite to your cookies and so the following message might appear in your console:

Cookie “myCookie” has “SameSite” policy set to “Lax” because it is missing a “SameSite” attribute, and “SameSite=Lax” is the default value for this attribute.

454 questions
3
votes
0 answers

SameSite=None and secure cookies are still blocked by Chrome in incognito, any solution (clean or workaround)?

We are facing issue related to samesite=none cookie being ignored by chrome in incognito mode. Details: We are trying to open an asp.net webform application inside an iframe from our another application, both the applications are on subdomains of…
LearningNeverEnds
  • 374
  • 1
  • 3
  • 22
3
votes
1 answer

Samesite=Strict cookies are not included in 302 redirects when user clicks link from a different domain

A customer will link to one of our webpages on their site: customer.site/links.html A person clicks that link and gets sent to our.site/webapp/handlerequest.aspx?someparam=somevalue The value of someparam is set in a cookie with SameSite=Strict…
scott.korin
  • 2,537
  • 2
  • 23
  • 36
3
votes
1 answer

Is there a way to set the SameSite cookie to none with Nginx?

On an Apache test server, our vendors were able to achieve what we needed by setting Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure;SameSite=None in .htaccess. However, our live site is running Nginx and we are having trouble figuring out how to…
Steven Lykins
  • 59
  • 1
  • 3
3
votes
2 answers

How to set samesite cookie on WildFly 20?

I need to set same site cookie attribute to Strict on WildFly20 server responses. I need to do it via server configuration. Any help ??
Amit P
  • 467
  • 6
  • 20
3
votes
0 answers

Getting SameSite cookie issues with Azure AD authentication with downstream WebAPI

I added support in my Blazor Server app for downstream API in which I send an access token to the API. This caused the authentication against Azure AD to stop working, by giving me cookies that chrome refuses due to SameSite policy (it does…
3
votes
1 answer

Setting cookie SameSite=None doesn't work on Chrome / JSP、JAVASCRIPT

I am working on a JSP(tomcat6) application. (domain is different) I'm trying to set the same-site attribute to None because The cookies have disappeared after more than 2 minutes due to the new version of the chrome browser. (Release date for a fix…
DJQTDJ
  • 71
  • 1
  • 9
3
votes
2 answers

Flask+Vue Flask session are not persistant because of SameSite problem in chrome

I'm trying to use Flask + Vue build using the SPA style mentioned in the article: https://testdriven.io/blog/combine-flask-vue/ When using chrome, Flask sessions are not persistent google dev tools is raising a SameSite problem: I tried to fix it…
Idan
  • 72
  • 1
  • 15
3
votes
0 answers

Cookies with SameSite=Lax attribute are not sent on Safari 13.1.2 with GET

I have set SameSite=Lax on cookies using apache config header rule (Header edit Set-Cookie ^(.*)$ "$1;SameSite=Lax") in my application(xyz.example.com) which is picked up and set appropriately by the browsers. However, while making a cross domain…
rchaos
  • 161
  • 1
  • 5
3
votes
3 answers

SameSite cookies in ASP.NET 4.0

I have an application written in ASP.NET 4.0. All was working fine till google chrome introduced this samesite cookie default value to 'lex'. There is a solution of handling samesite cookie in asp.net version…
Adeel
  • 413
  • 1
  • 7
  • 22
3
votes
0 answers

SameSite Cookie Header and Websocket not working

Before we set sameSite: None our game did not work on any of the 3rd party sites. As can be seen in this video: https://youtu.be/_AYCvCrZyDk The website loads but web-socket can not create a connection so everything is shown as loading... but the…
demiculus
  • 1,243
  • 1
  • 12
  • 32
3
votes
1 answer

CSRF_COOKIE_SAMESITE equivalent for django 1.6.5

I am trying to launch my application which was written using django 1.6.5 version, in a salesforce webtab iframe. I was getting a "CSRF cookie not set" error while trying to login. I understood through the console logs that in the latest version of…
3
votes
0 answers

Cookies' SameSite=None setting being lost

We have an ASP.NET based website. We have a requirement to run the site in a 3rd party's iframe. Various parts of the site recently stopped working in this iframe scenario and we've narrowed it down to user's using Chrome and the…
Jason Booth
  • 185
  • 1
  • 10
3
votes
0 answers

Samesite Lax expected behavior of third party redirect inside an iframe

different samesite lax behavior on chrome versus firefox for the following: an html document on my site includes an iframe with another document on my site then, a third party document is loaded in the iframe (with a return_url passed as a…
3
votes
1 answer

How does Chrome or any other browser use Public Suffix List?

Just curious, Chrome or any other browser does not allow to set cookies present in public suffix list. Domains like .github.io or .compute.aws.amazon.com are a few examples present on the list. How does it stay in sync with the updates on the…
Abhiroj Panwar
  • 485
  • 9
  • 19
3
votes
0 answers

SameSite attribute not set for .AspNet.Cookies

I am working on an ASP.NET application. I'm trying to set the samesite attribute to "Lax", but it is still showing as blank. This is what I have tried so far: Upgraded .Net framework to v4.7.2 from v4.6 Set samesite in httpcookies in web.config -…
Animesh
  • 31
  • 1