Azure web app - Cache-control: Private

PatricS 61 Reputation points
2020-05-14T08:14:34.85+00:00

Hi!

When enabling cache in frontdoor, it caches my wordpress sites backend/wp-admin.
How and where am i suppose to put cache-control: private ?
Do i put it in web.config?

Br
Pat

Azure Front Door
Azure Front Door
An Azure service that provides a cloud content delivery network with threat protection.
692 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,906 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 28,631 Reputation points Microsoft Employee
    2020-05-14T22:40:53.707+00:00

    Hi @PatricSten,

    Correct, you can add your cache control as a rewrite action in your web.config of your wordpress site.

    <rule name='AdjustCache'>
    <match serverVariable='RESPONSE_CACHE_CONTROL' pattern='.*' />
    <action type='Rewrite' value='no-cache, no-store, must-revalidate' />
    </rule>
    

    Let me know if this helps.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.