Forum Discussion
issues to set cookie with IE only
- Mar 17, 2017
Dakar,
The Expires attribute in a cookie is not supposed to be an integer.
You can check this in RFC 6265.
I haven't tested this code, but I believe it is closer to what you're looking for.
when HTTP_REQUEST { if { [SSL::cipher version] eq "TLSv1" } { if { not ( [HTTP::cookie exists TLSDISABLE] ) } { set expires [clock format [expr { [clock seconds] + 28800 } ] -format "%a, %d-%b-%Y %T GMT" -gmt 1] HTTP::respond 302 Location "http://page.abc.com/sslwarning.html" "Set-Cookie" "TLSDISABLE=good; path=/; Expires=${expires}; Secure; HttpOnly" } } }
The Expires attribute would look something like this Expires=Sat, 18-Mar-2017 05:32:54 GMT
Dakar,
The Expires attribute in a cookie is not supposed to be an integer.
You can check this in RFC 6265.
I haven't tested this code, but I believe it is closer to what you're looking for.
when HTTP_REQUEST {
if { [SSL::cipher version] eq "TLSv1" } {
if { not ( [HTTP::cookie exists TLSDISABLE] ) } {
set expires [clock format [expr { [clock seconds] + 28800 } ] -format "%a, %d-%b-%Y %T GMT" -gmt 1]
HTTP::respond 302 Location "http://page.abc.com/sslwarning.html" "Set-Cookie" "TLSDISABLE=good; path=/; Expires=${expires}; Secure; HttpOnly"
}
}
}
The Expires attribute would look something like this Expires=Sat, 18-Mar-2017 05:32:54 GMT
Jeremy, Thank you for your quick answer. Your suggestion seems to be working correctly. I will just observe the behavior in 8 hours, in case....
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