Forum Discussion
Change Cache Control Header on APM Policy
Greetings,
Our application security team is requesting that we update the cache-control header on our login page for that uses an APM policy. Essentially, they are looking for the cache-control header to read as "no-cache, no-store, max-age=0" on the abc.com/my.policy page. I have attempted to do an iRule to replace the cache-control header as shown below:
when CLIENT_ACCEPTED {
ACCESS::restrict_irule_events disable
}
when HTTP_RESPONSE {
HTTP::header replace "Cache-control" "no-cache, no-store, max-age=0"
}
But this iRule ends up adding a duplicate Cache-control header, one that states "no-cache, no-store, max-age=0" and the original that states "no-cache, must-revalidate."
I have also tried going into the Advanced Customization of the APM policy and tried to edit the
<meta http-equiv="cache-control" content="no-cache"> in the code to what I need it to be, but every time I make the change and save draft, it reverts back to original statement.
Can someone please assist on this issue? Thank you.
- iaine
Nacreous
Hi
Try moving your HTTP::header command to HTTP_RESPONSE_RELEASE so that it gets amended just before being sent
- DanielA0501
Nimbostratus
Thank you, this worked.
Recent Discussions
Related Content
* 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