Forum Discussion
Lior_Cohen_2771
Aug 30, 2017Nimbostratus
TCL error: <cache_response> - Out of bounds (line 2) invoked from within "CACHE::header replace X-Cache "HIT F5""</cache_response>
I'm Getting an error on My Irule
the rule need to indecate when the respond is a cache respond or an HTTP Respond
the Rule also change the "Cache-Control" header to Private to prevent from unknown Proxy\cache system to cache my content
when HTTP_RESPONSE {
HTTP::header insert X-Cache "MISS F5"
if {[string length [HTTP::header "Cache-Control"]]} {
set new_cache [string map -nocase {"public" "private"} [HTTP::header "Cache-Control"]]
HTTP::header replace Cache-Control $new_cache
}
}
when CACHE_RESPONSE {
CACHE::header replace X-Cache "HIT F5"
if {[string length [CACHE::header "Cache-Control"]]} {
set new_cache [string map -nocase {"public" "private"} [CACHE::header "Cache-Control"]]
CACHE::header replace Cache-Control $new_cache
}
}
- Jad_Tabbara__J1Cirrostratus
Hi again,
Check this ;)
https://devcentral.f5.com/questions/irule-to-modify-cache-control-header-55333
Regards
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