Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Manejo multiples cookies HTTP_RESPONSE

Patricio_quirog
Altocumulus
Altocumulus

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"

}
}

}

7 REPLIES 7

JRahm
Community Manager
Community Manager

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.

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.

 

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?

I need to configure more than one cookie within the http_response and I have not found information regarding that, as I mentioned above with that example of cookie names I hope I have been more explicit now my apologies my English is not that good

No worries on the language barrier, we'll get there! 😀

I think these two iRules will be helpful for you to study on what to achieve. Take a look and then let me know if you're still stuck, or if you have any clarifying questions.

 

thanks las mirare y te comento!

you need more detail?