Forum Discussion
BrianG99_140859
Oct 08, 2014Nimbostratus
iRule to rewrite Cookie path
Hi, any idea how I can use an iRule to rewrite a cookie path from the server response? I need to rewrite the set-cookie path in the response from path=/abc to path=/
Thanks in advance.
Rega...
Alscion_68122
Feb 15, 2016Nimbostratus
Hi,
Here is an irule to rewrite cookie path. You can use the path you want instead of MyCustomPath
when HTTP_RESPONSE { set cookies [HTTP::cookie names] foreach cookie $cookies { set cookie_value [HTTP::cookie $cookie] set cookie_path "/MyCustomPass" HTTP::cookie remove $cookie HTTP::cookie insert name $cookie value $cookie_value path $cookie_path } }
BR.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects