Adding "HttpOnly" to Cookie
Posted by mischa
If you need to add "HttpOnly" to a cookie:
Code:
I found that this works very well.
If you need to add "HttpOnly" to a cookie:
Code:
when HTTP_RESPONSE {
if { [HTTP::header exists "Set-Cookie"] } {
set cookie_value [HTTP::cookie "TestCookie"]
HTTP::cookie remove "TestCookie"
HTTP::header insert "Set-Cookie" "TestCookie=$cookie_value; HttpOnly"
}
}
I found that this works very well.
0