Forum Discussion
Karan_Dadwal_23
Nimbostratus
Nov 19, 2015iRULE to secure F5 cookie
Hi
I added irule below to add secure flag on cookie sent by F5 to client but post implementation JSESSIONID cookie disappeared:
when HTTP_RESPONSE {
foreach mycookie [HTTP::cookie names...
Karan_Dadwal_23
Nimbostratus
Nov 20, 2015Hi
Will this solve :
Rule set 1:
when HTTP_RESPONSE {
foreach x [HTTP::cookie names] {
if { $x starts_with "cookiename1" or "cookiename2" } {
HTTP::cookie secure $x enable
}
}
}
====================================================================================
Rule set 2:
when HTTP_RESPONSE {
foreach x [HTTP::cookie names] {
if { $x contains "cookiename1" or "cookiename2" } {
HTTP::cookie secure $x enable
}
}
}
I am using cookie persistence and adding cookie name.cookiename1 is used on set of one VIPs and cookiename2 is used on another. I want irule to be able to set secure flag to these cookies only and not any other returned by server or app. Will this irule meet my purpose without altering any other cookie in HTTP response.
Thanks
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