Forum Discussion

Nik2607's avatar
Nik2607
Icon for Altostratus rankAltostratus
Jan 17, 2023

Insert "samesite = none" attribute in an existing iRule

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]
}
}