Forum Discussion
Shawn_Puckett_8
Nimbostratus
Jul 09, 2007Secure Tag for Mutliple Set-Cookies
I’m looking some help with an iRule that would loop through all my Set-Cookie headers in each http::response and set the secure tag on all cookies.
I’ve used the code from http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&postid=12199&view=topic
but it does not set secure on all the cookies unless they are in a single multipart Set-Cookie header, which mine are multiple Set-Cookies so with that code only the last one of the Set-Cookie headers is set.
With the code from that post I see this:
Set-Cookie: UserName=jdoe; path=/; HttpOnly
Set-Cookie: .ASPXAUTH=259AE6492D3; path=/; HttpOnly; Secure
Any help would be great as we have a customer that is upset and wants a fix as soon as possible.
Thanks in advance!
Shawn
- Deb_Allen_18Historic F5 AccountYou can loop through headers of the same name using the approach detailed (by yours truly) near the end of this thread: Click here
- Shawn_Puckett_8
Nimbostratus
Thanks.when HTTP_RESPONSE { set myValues [HTTP::cookie names] foreach mycookies $myValues { HTTP::cookie secure $mycookies 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