Forum Discussion
Andrea_Arquint
Oct 20, 2010Nimbostratus
cookie insertion
Hi
How can I set a cookie in the clients browser if he makes a request to a specific /folder/ ???
thanx
bb
Chris_Miller
Oct 20, 2010Altostratus
I just had a total brain-fart. We need to do cookie insert in the response event.
Try this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/folder" } {
set cinsert 1
} else { set cinsert 0 }}
when HTTP_RESPONSE {
if { $cinsert eq 1 } {
HTTP::cookie insert "name" value "value" path / }}
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