Forum Discussion
diana_24252
Nimbostratus
Apr 02, 2009Need iRule to enable "secure" attribute on cookies
ASP.NET application is sending 4 cookies to the client and they are not marked "secure" (i.e., the cookies don't have the attribute that tells the client PC to send the cookies only over an SSL connection). The cookies do not need to be encrypted, they just need to have the "secure" attribute enabled. I found this:
when HTTP_RESPONSE
{
foreach cookiename [HTTP::cookie names]
{
HTTP::cookie secure $cookiename enable;
}
}
but I am not sure how to convert it to a working iRule for our situation.
The cookie names are as follows:
ASP.NET_SessionId
.ASPXAUTH
VenueDLA
.ASPXCOOKIEAUTH-VenueRRDAdmin
This is for a LTM 3400, BIG-IP 9.3.0 Build 178.5
Thank you!
3 Replies
- hoolio
Cirrostratus
Something like this?when HTTP_RESPONSE { foreach cookiename [list ASP.NET_SessionId .ASPXAUTH VenueDLA .ASPXCOOKIEAUTH-VenueRRDAdmin] { HTTP::cookie secure $cookiename enable; } }
- diana_24252
Nimbostratus
Thank you Aaron! I got word from the app team that the iRule worked. I am wondering if we can use classes as it will be more convinient to add and remove cookie names if need be? - hoolio
Cirrostratus
Sure, it's possible to read the class entries instead of a list in the iRule. You could change the [list cookie1 cookie2...] to $::class_name.
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