# I cannot set more than 1 cookie from controller

**URL:** https://meta.discourse.org/t/i-cannot-set-more-than-1-cookie-from-controller/229736
**Category:** Development
**Created:** [June 12, 2022, 8:02pm UTC](https://meta.discourse.org/t/i-cannot-set-more-than-1-cookie-from-controller/229736 "2022-06-12T20:02:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Devarsh\_Mavani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/devarsh_mavani/32/251071_2.png) [@Devarsh\_Mavani](https://meta.discourse.org/u/Devarsh_Mavani)
#### Post date: [June 12, 2022, 8:02pm UTC](https://meta.discourse.org/t/i-cannot-set-more-than-1-cookie-from-controller/229736/1 "2022-06-12T20:02:21Z")

</div>

i am modifiying discourse and for that inside session\_controller.db file I am doing this

```plaintext
cookies[:sso_payload] = payload || request.query_string
cookies[:sso_destination_url] = data[:return_sso_url]

```

However it does not set the sso\_destination\_url cookie. if i remove sso\_payload cookie, in that case sso\_destination\_url will be set. But both of them together does not work.

Please help i am new to ruby i searched online for help but couldn’t find anything

---

<div class="post-metadata">

### Author: ![Devarsh\_Mavani](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/devarsh_mavani/32/251071_2.png) [@Devarsh\_Mavani](https://meta.discourse.org/u/Devarsh_Mavani)
#### Post date: [June 12, 2022, 8:10pm UTC](https://meta.discourse.org/t/i-cannot-set-more-than-1-cookie-from-controller/229736/2 "2022-06-12T20:10:28Z")

</div>

is there some type of limit set for cookies?
