Forum Discussion
Mack_Hanson_107
Nimbostratus
Nov 09, 2005Set multiple cookies in a 302 response
Currently I've got a rule that works for setting one cookie via "HTTP::respond 302". How would I add two or more in the same redirect? I can do it in java, but would rather do it at the BigIP. Here's the rule I have that adds a single cookie.
when HTTP_REQUEST {
set ckname "appID"
set ckvalue "45893"
set cookie [format "%s=%s; path=/; domain=%s" $ckname $ckvalue ".myco.org"]
HTTP::respond 302 Location "http://www.myco.org" "Set-Cookie" $cookie
}
- drteeth_127330Historic F5 AccountMultiple cookies can be specified in the same Set-Cookie header. So, all you have to do is append another cookie to the $cookie string separated by a semicolon.
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