Skip to content

Instantly share code, notes, and snippets.

@nehemiahj
Created August 25, 2022 20:31
Show Gist options
  • Save nehemiahj/966935d281f1ce6ff8305ac1378e359f to your computer and use it in GitHub Desktop.
Save nehemiahj/966935d281f1ce6ff8305ac1378e359f to your computer and use it in GitHub Desktop.
Cache Control Header for 301 Redirects
<outboundRules>
<rule name="Require clients to revalidationpermanent redirects">
<match serverVariable="RESPONSE_Cache_Control" pattern=".*" />
<conditions>
<add input="{RESPONSE_STATUS}" pattern="301" />
</conditions>
<action type="Rewrite" value="public, must-revalidate, max-age=0"/>
</rule>
</outboundRules>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment