2

I'm trying to use a subdomain cross site cookie with django but I cannot get it, I am in a valid subdomain but it doesn't seems to be useful.

Thie is my conf:

SESSION_COOKIE_SAMESITE = 'None'
SESSION_COOKIE_DOMAIN = '.ngrok.io'

This is the headers from the browser: headers

But I get the message:

This set-cookie domain attribute was invalid with regards to the current host url

How can I do to make it work?

Felipe Buccioni
  • 19,109
  • 2
  • 28
  • 28

1 Answers1

1

As says in this answer there is a newer specification for cookies (RFC 6265). The old specification can let you share a cookie sent it from a subdomain "sub.domain.com" or "domain.com" with domain=.domain.com to share between domains and subdomains, but the newer specification can let you share by domain and subdomain only if you sent the cookie from "domain.com" with SameSite=None and domain=domain.com

Community
  • 1
  • 1
Felipe Buccioni
  • 19,109
  • 2
  • 28
  • 28