Forum Discussion
NateV_219556
Nimbostratus
May 08, 2017http set cookie and a http reply redirect via policy
I am using a multi-rule policy on a new application. I have a requirement to set a cookie and issue a 302 redirect to another website. If I omit the redirect I can see that my cookie is set just fi...
Leonardo_Souza
Cirrocumulus
May 09, 2017The default strategy is first-match, so only the first rule is triggered. Change that to all-match, and should work.
Example from my lab, where I successfully tested this:
[root@LABBIGIP2:ModuleNotLicensed:Active:Changes Pending] config tmsh list ltm policy policy1
ltm policy policy1 {
controls { forwarding }
requires { http }
rules {
cookie {
actions {
0 {
http-set-cookie
response
insert
name stop_mobile
path /
value yes
}
}
ordinal 1
}
redirect {
actions {
0 {
http-reply
redirect
location http://asm.lab.local/
}
}
ordinal 2
}
}
strategy all-match
}
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