Forum Discussion
Robert_47833
Apr 21, 2011Altostratus
question in http::cookie secure
when HTTP_RESPONSE
{
set myValues [HTTP::cookie names]
foreach mycookie $myValues
{
if {$mycookie == "cjj_INFO"}
{
Do nothin...
naladar_65658
Apr 21, 2011Altostratus
Hello jucao,
The iRule above shows to be a valid iRule when I compile it in the F5 iRule Editor. (You should get that if you don't already have it... it's awesome). The iRule above should look at the cookies in the headers and if it cookies are not named cjj_INFO or CJJ_SESS then it will set the secure flag on the response. Just an FYI according to the documentation if you set the response flag to secure on a cookie that is already secure nothing will happen to the cookie. It will stay secure and will not be detrimental in any way.
Here is an iRule similar to the one above that might also work:
when HTTP_RESPONSE {
set mycookienames [HTTP::cookie names]
foreach cookie $mycookienames if !{ $mycookienames contains "cjj_INFO" or "cjj_SESS" } {
HTTP::cookie secure $mycookienames 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