How to mark cookie as secure using an irule

Scenario

You are using SSL offloading and cookies are not being marked as secure.

Solution

The irule should look as follows and then it should be applied to the the VIP in question. It does the following:

The foreach command is creating a loop and a variable for each cookie. Then it parses all the cookie names, sets them individually as mycookie variable and then secures them and finally loops back around.

Result

Cookies are now marked as secure.

 

 

Reference:

This question was posted by me on the F5 forum and the solution confirmed here:

https://support.f5.com/kb/en-us/solutions/public/13000/100/sol13171.html

Leave a Reply

Your email address will not be published. Required fields are marked *