Forum Discussion
together_183451
Nimbostratus
Jan 23, 2015Following iRule not working in my setup please correct mistake if found
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "mfcomb.birlasunlife.com" } {
if { ([string tolower [HTTP::uri]] starts_with "/media") or
([string tolower [H...
StephanManthey
Nacreous
Jan 24, 2015Hi together,
I´ve added some comments to the posted iRule to explain what it does: event fired when server reponse is received on virtual server
when HTTP_RESPONSE {
build a list containing all cookie names retrieved from server response
comment: the variable should better be named myCookieNamesList
set myValues [HTTP::cookie names]
cycle through all list entries ( per cycle $mycookies will represent one of the seen cookie names
foreach mycookies $myValues {
rebuild all cookies by version 1 cookie
if { [HTTP::cookie version $mycookies] != 1 } {
set ckval [HTTP::cookie value $mycookies]
set ckpath [HTTP::cookie path $mycookies]
HTTP::cookie remove $mycookies
HTTP::cookie insert name $mycookies value $ckval path $ckpath version 1
}
set "secure" attribute for current cookie to value "enable"
HTTP::cookie secure $mycookies enable
set "httponly" attribute for current cookie to value "enable"
HTTP::cookie httponly $mycookies enable
}
}
Thanks, Stephan
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