Adding "HttpOnly" to Cookie

mischamischa Member
Posted by mischa

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.
Sign In or Register to comment.