Forum Discussion
Setting Cookie "HttpOnly" flag and Expires on Redirect and response
when HTTP_REQUEST {
1 year = 31536000 seconds
set cookie_expire 31536000
set cookie_expire_date [clock format [expr [clock seconds] + $cookie_expire] -format "%a, %d-%b-%Y %H:%M:%S GMT" -gmt true]
set cookie_domain .test.domain.local
set cookie_name my_cookie
set cookie_value 12345
set cookie [format "%s=%s; path=/; domain=%s; expires=%s; HttpOnly" $cookie_name $cookie_value $cookie_domain $cookie_expire_date]
HTTP::respond 302 Location "http://www.google.com" "Set-Cookie" $cookie
}
This works for me. I made a few tweaks, but you were 95% of the way there. Hope this helps,
George
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