Score:0

Apache Server Config Set Headers Conditionally

in flag

I am trying to set cache age for 200 responses and no cache for rest of the calls. I tried below config, which works fine when 200 OK response comes up and I can see max-age=800 in headers

But for other responses like 400 etc. I am not able to see cache-control header itself in developer console. Any clue to fix this issue. below is what i tried so far

   <If "%{REQUEST_STATUS} == '200'">
         Header set Cache-Control: "max-age=800"
    </If>
    <If "%{REQUEST_STATUS} != '200'">
         Header set Cache-Control: "max-age=0, no-cache, no-store, must-revalidate"
    </If>

Thanks,

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.