aFleX for cookies httponly with one exception

Hello,

I need to make a script aFleX for cookies with flag HTTPonly with one exception for cookie with name LID.

I tried to use aFleX like below:

when HTTP\_RESPONSE \{
if \{([HTTP::header exists "Set-Cookie"] and [HTTP::cookie contains "LID"])\} \{
set cookie\_value [HTTP::cookie "TestCookie1"]

HTTP::cookie remove “TestCookie1”

HTTP::header insert "Set-Cookie" "TestCookie1=$cookie\_value; secure"

  \} elseif \{[HTTP::header exists "Set-Cookie"]\} \{
set cookie\_value [HTTP::cookie "TestCookie"]

HTTP::cookie remove “TestCookie”

HTTP::header insert "Set-Cookie" "TestCookie=$cookie\_value; HttpOnly"

\}
\}

but it doesn’t work - every cookies don’t have the flag HTTPonly (secure)

Do you use http or https?

If a cookie with secure flag transmitted by http, the browser would ignore the cookie.

It uses https