Forum Discussion
cgallimore_1748
Nimbostratus
Jul 28, 2016Setting a cookie
I am trying to set a cookie on the client machine for it to pass on to the server. How would I go about doing this? My cookie knowledge is very limited. Currently I am trying to set it via the code below and am not seeing it get set in a Fiddler capture on the client or seeing the desired results from the server side.
when HTTP_RESPONSE { HTTP::cookie insert name "CookieName" value "CookieValue" }
Thanks for any help
2 Replies
Hi,
You can insert a cookie by using a code similar to the one below in an irule that you bind to your Virtual Server :
when HTTP_REQUEST { set host [HTTP::host] } when HTTP_RESPONSE { HTTP::cookie insert name CookieName value CookieValue domain $host }
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