We have setup a reverse proxy using ARR in front of our Sitecore site. We are using this reverse proxy for serving sitecore media items only. Sitecore media items are getting cached properly on disk using ARR.
Now the problem we are facing is that, for all images, the HTTP Status Code is always 200 and so they are not cached in browser. If we disable reverse proxy then HTTP Status Code is 304 and browser renders images from local cache.
Is there any reason why ARR does not send 304 status code ?
Update #1: Below is the ARR rule which we have setup:
<rule name="Default ReWrite" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
<match url="^(.*)" />
<conditions>
<add input="{CACHE_URL}" pattern="^(https?)://" />
</conditions>
<action type="Rewrite" url="http://127.0.0.1/{R:0}" logRewrittenUrl="true" />
<serverVariables>
</serverVariables>
</rule>