Forum Discussion
Sam_Novak
Sep 19, 2016Altostratus
iRule header removal for cached item reponses
Does anyone know if iRules do not apply to cached responses? I like to strip out X-Powered-By headers from my responses, but I'm seeing that header on the client side of things; I haven't made any ch...
Sam_Novak
Sep 19, 2016Altostratus
I should've done more research before putting in this ask.
I found the CACHE_RESPONSE event and I can manipulate it just like the HTTP_RESPONSE event
when RULE_INIT {
set static::InfoHeaders { "Server" "X-Powered-By" "X-SharePointHealthScore" "X-AspNet-Version" "X-AspNetMvc-Version" }}
when HTTP_RESPONSE {
Remove headers that provide information about the backend
foreach header $static::InfoHeaders {
HTTP::header remove $header
}
when CACHE_RESPONSE {
Remove headers that provide information about the backend
foreach header $static::InfoHeaders {
CACHE::header remove $header
}}
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