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-

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"
\}
\}