# Add SameSite attribute to cookie function?

**URL:** https://meta.discourse.org/t/add-samesite-attribute-to-cookie-function/286312
**Category:** Feature
**Tags:** completed
**Created:** [November 22, 2023, 11:08am UTC](https://meta.discourse.org/t/add-samesite-attribute-to-cookie-function/286312 "2023-11-22T11:08:37Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [September 13, 2024, 7:23pm UTC](https://meta.discourse.org/t/add-samesite-attribute-to-cookie-function/286312/4 "2024-09-13T19:23:15Z")

</div>

Hi Stephen, Discourse sets all cookies to SameSite=lax. So you don’t need to do anything 🎉

The issue in the original post by @nolo was fixed back in April by [this commit](https://github.com/discourse/discourse/pull/26559).

It is technically possible to vary the SameSite value of server-set cookies by changing the hidden `same_site_cookies` setting via the console. But we strongly advise against it - picking other values will either cause functional issues or security issues.

---

_[View the full topic](https://meta.discourse.org/t/add-samesite-attribute-to-cookie-function/286312)._
