Forum Discussion
RajaG
Jul 25, 2022Nimbostratus
Rewrite single cookie "USERCOOKIE" domain if cookie domain is "www1.test,example.com"
in General browser request have multiple cookies We just wanted to rewrite single cookie "USERCOOKIE" domain if cookie domain is "www1.test,example.com" change it to ".test,example.com". if custome...
- Jul 27, 2022
Something like this should work:
when HTTP_RESPONSE { if { [HTTP::cookie exists "USERCOOKIE"] } { HTTP::cookie domain "USERCOOKIE" ".[domain [HTTP::cookie domain "USERCOOKIE" 3]]" } }
- Jul 28, 2022
Hi RajaG - did Jason's solution work for you? If yes, can you please mark it as an Accepted Solution, and that way any user having the same problem can quickly find the answer later (and Jason gets a cookie). 🙂
If no - let's keep the thread going.
JRahm
Jul 27, 2022Admin
Something like this should work:
when HTTP_RESPONSE {
if { [HTTP::cookie exists "USERCOOKIE"] } {
HTTP::cookie domain "USERCOOKIE" ".[domain [HTTP::cookie domain "USERCOOKIE" 3]]"
}
}
- SelimMar 19, 2024Nimbostratus
Hi JRahm,
There is an error in this code that I can't find. Can't save it as an Irule.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects