Forum Discussion
Oliviattt_32197
Nimbostratus
May 25, 2017F5 iRule to Secure Cookie with HTTPOnly and Secure but not contains cookie name="cnlfsid"
Hi,
We need to Secure Cookie with HTTPOnly and Secure but not contains a cookie name ="cnlfsid"
Here is my code:
when HTTP_RESPONSE {
foreach x [HTTP::cookie names] {
...
JG
Cumulonimbus
May 25, 2017Try this modified version:
when HTTP_RESPONSE {
foreach x [HTTP::cookie names] {
if { $x equals "cnlfsid" } {
continue
}
set ckname $x
set ckvalue [HTTP::cookie value $x]
set ckpath [HTTP::cookie $x path]
HTTP::cookie remove $x
HTTP::cookie insert name $ckname value $ckvalue path $ckpath version 1
HTTP::cookie secure $ckname enable
HTTP::cookie httponly $ckname enable
}
}
.
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
