Forum Discussion
Teemu_Kunnari_1
Nimbostratus
Feb 01, 2016Adding httponyle and secure attributes a ustom cookie persistence profile
Hi,
Customer was asking if it would be possible to add httponly and secure attributes to their Virtual Server specific cookie based persistence profile for example i have cookie profile for cust...
Kai_Wilke
MVP
Feb 02, 2016Hi Teemu,
you're right, the build in support for HttpOnly and Secure flags is somewhat new (v12+ feature). To have the same functionality for older versions, you may want to use the iRule below...
when HTTP_RESPONSE {
foreach cookie [HTTP::cookie names] {
if { $cookie starts_with "BIGipServer" } {
HTTP::cookie version $cookie 1
HTTP::cookie secure $cookie enable
HTTP::cookie httponly $cookie enable
}
}
}
Note: You have to change the
line, if you're using a non-default cookie name.$cookie starts_with "BIGipServer"
Cheers, Kai
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