Options

Setting a Cookie with Secure and HTTPOnly

Posted by TODDH

We are in the process of going through some compliance audits, and the cookies that the load balancers use to return packets to specific servers can contain the “secure” attribute but we don’t have a way to include the “httponly” attribute. Is there a way with an aFlex to set both?

Thanks,

-Todd-

Comments

  • Options
    deastmandeastman Member
    edited February 2014
    when HTTP_RESPONSE {
    if { [HTTP::header exists "Set-Cookie"] } {
    set cookie_value [HTTP::cookie "persistcookie"]
    HTTP::cookie remove "persistcookie"
    HTTP::header insert "Set-Cookie" "persistcookie=$cookie_value;path=/; HttpOnly; Secure"
    }
    }
Sign In or Register to comment.