Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 
Custom Alert Banner

Irule Redirect and cookie inser not working as expected

jackwik_134864
Nimbostratus
Nimbostratus

Hi,

 

I am trying to achieve the following:

 

1). Cookie Insert 2). Define the domain name 3). When redirecting using the original cookie that was received before redirection took place.

 

IRULE is as follows

 

when HTTP_RESPONSE {

 

Check if the persistence cookie exists in the response if {[HTTP::cookie exists "Mobile"]} { set the domain attribute on the persistence cookie HTTP::cookie domain "Test" ".888sport.com" if { [HTTP::is_redirect] } { foreach aCookieName [HTTP::cookie names] { set currentCookie "$aCookieName=[HTTP::cookie value $aCookieName]" set cookies "$cookies\r\nSet-Cookie: $currentCookie" }

 

}

 

} }

 

Attached screenshot. Any suggestions/help much appreciated.

 

Thanks.

 

Jack. 0691T000006ApnPQAS.png

 

0 REPLIES 0