Forum Discussion
kohli9harjeev
Nimbostratus
Dec 14, 2015LTM logs filled with err tmm1[11650]: 01220001:3: TCL error: /Common/HttpOnly_Secure_irule <http_response> - Operation not supported (line 1)
Hi All,
I implemented the following irule to include "HttpOnly" and "Secure" attribute in HTTP response .Though it is working fine TP response but it is showing lot of errors on the ltm logs ...
Kai_Wilke
MVP
Dec 15, 2015Hi kohli9harjeev,
your code looks good to me.
The error message will most likely occour if the current HTTP-request was "somehow" already responded by previous iRules. To check this behavior you could modify your code to...
when HTTP_RESPONSE {
set cookie_value [HTTP::header values "Set-Cookie"]
if { $cookie_value ne ""} then {
if { [catch {HTTP::payload replace 0 0 {}}] } then {
log -noname local0. "Warning: The HTTP request is already responded. So the next command will create an exception!"
}
HTTP::header remove "Set-Cookie"
foreach set_cookie_header $cookie_value {
HTTP::header insert "Set-Cookie" "${set_cookie_header};Secure;HttpOnly"
}
}
}Cheers, Kai
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects