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

Insert "samesite = none" attribute in an existing iRule

Nik2607
Altostratus
Altostratus

Hi Team,

We have got requirement to add "samesite = none" attribute in the F5 LB cookie. The F5 have got the peoplesoft URLs hosted.

We have seen many documents and knowledge articles on the F5 Devcentre to configure the iRule but i am not sure how this will work. 

There is an iRule already configured for the Peoplesoft VIP to Rewrite cookie. so i just wanted to know if we can insert the samesite attribute in the same iRule and if yes then where to add the syntax?

here is an Irule - 

When HTTP_RESPONSE {
if {[HTTP::cookie exists "cookie_name"]} {
set old_cookie [HTTP::cookie "cookie_name"]
# Now delete and reinsert with the domain info
HTTP::cookie remove cookie_name
HTTP::cookie insert name cookie_name value $old_cookie domain .comany.com path /
set new_cookie_domain [HTTP::cookie domain "cookie_name"]
set new_cookie [HTTP::cookie .company.com]
}
}

4 REPLIES 4

You could add:

HTTP::cookie attribute $cookie insert "SameSite" "None"

Nik2607
Altostratus
Altostratus

@Juergen_Mang  thanks for your response. 

where do i need to add this syntax? i mean at which line in the above iRule?

After you inserted the new cookie.

Nik2607
Altostratus
Altostratus

Thank you. I will give a try.