Forum Discussion

DanielA0501's avatar
DanielA0501
Icon for Nimbostratus rankNimbostratus
Oct 15, 2019

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.