Forum Discussion
Adding http only / secure flags to TS cookies per policy
- May 01, 2021
Hi Dave, it appears you are using iRule from the discussion. It was used to add those attributes to all cookies and skip for some selective cookies which were selected in switch statement.
If you want to add secure/httponly attributes only for ASM TS cookies but keep other session/application cookies unchanged, you can try using the below simpler version of iRule. This can be applied to 8443 ASM VIP. This should work on any version above 11.x
Reference: https://support.f5.com/csp/article/K11324
when HTTP_RESPONSE_RELEASE { foreach cookielist [HTTP::cookie names] { switch -glob [string tolower $cookielist] { "ts*" { HTTP::cookie secure $cookielist enable HTTP::cookie httponly $cookielist enable } default return } } }
HTTP_RESPONSE event is fired before request is sent to ASM. So you want to try to modify it with " HTTP_RESPONSE_RELEASE" event. For more details, please check the below article.
https://support.f5.com/csp/article/K14211
Recent Discussions
Related Content
* 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