Forum Discussion

Patricio_quirog's avatar
Patricio_quirog
Icon for Altocumulus rankAltocumulus
Sep 26, 2022

Manejo multiples cookies HTTP_RESPONSE

holas estimados me dirijo a uds por que tratando de manejar multiples cookies dentro de  un http response y no se como escribir dentro de esta irule por favor espero su ayuda!!!! adjunto el modelo gracias

when HTTP_RESPONSE {
HTTP::cookie secure "JSESSIONID" enable
set ck [HTTP::header values "Set-Cookie"]
HTTP::header remove "Set-Cookie"
foreach acookie $ck {
if {$acookie starts_with "JSESSIONID"} {
HTTP::header insert "Set-Cookie" "${acookie}; HttpOnly"
} else {
HTTP::header insert "Set-Cookie" "${acookie}; HttpOnly"

}
}

}

  • can you repost in English with additional details on exactly what you're trying to achieve? I'm not sure I gleaned enough from translating your text in the google translate tool.

    • Patricio_quirog's avatar
      Patricio_quirog
      Icon for Altocumulus rankAltocumulus

      i need manage multiples cookies in the http_response like a show you in the post earlier can you help me??? like a JSESSIONID1, JSESSIONID2 etc,  how i can writte properly in that irule that names or more names.

       

      • JRahm's avatar
        JRahm
        Icon for Admin rankAdmin

        yes, I need to know specifics about what you mean by manage. Are these existing cookies from the server you wish to manipulate? If so, how do you want to manipulate them? If not, and you are creating them, what are you wanting to populate them with?

        Are you just wanting to make sure the cookies are secured and set to httponly? And ONLY for these jsession cookies?