Forum Discussion
Aug 04, 2010
How to set/detect/read cookies on the client machine
Hello All,
I am trying to set a cookie and detect it on the client machine, but am having issues detecting the cookie. My goal is to send credentials over SSL and go back to HTTP after it's been va...
hoolio
Cirrostratus
Aug 04, 2010You can check which cookies the client sends to LTM using an iRule which logs in HTTP_REQUEST:
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::method] request to [HTTP::host][HTTP::uri]"
foreach cookie [HTTP::cookie names] {
log local0. "[IP::client_addr]:[TCP::client_port]: Cookie $cookie = [HTTP::cookie value $cookie]"
}
}
To log the cookies in the response, you could use something similar:
when HTTP_RESPONSE {
log local0. "[IP::client_addr]:[TCP::client_port]: [HTTP::status] response with Set-Cookie headers: [HTTP::header values Set-Cookie]"
}
For details on cookies and where browsers store them, you can check these sites:
http://www.cookiecentral.com/faq/3
http://www.aboutcookies.org/Default.aspx?page=1
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
