v1.7.0
📢 This release of gorilla/csrf changes the default SameSite
cookie attribute to address changes in the SameSite spec (see golang/go#36990)
Previously: The SameSiteDefaultMode
in csrf (prior to v1.7.0) would set SameSite
on the cookie, which is not valid in some browsers, notably older versions of Chrome/Android. These browsers would not set cookies with this "invalid" attribute.
Now: The default mode is SameSite=Lax
, which is supported by Chrome v51, Firefox v60, Safari v13 and most recent browsers.
If you're new to SameSite, read the MDN documentation for a great overview on why this attribute helps prevent cookies from being 'leaked' to third-party domains unintentionally.