Fix incorrect Last-Modified from backend?
batanun at hotmail.com
Wed Mar 18 14:15:49 UTC 2020
Long story short, one of our backend systems serves an incorrect Last-Modified response header, and I don't see a way to fix it at the source (third party system, not based on Nginx/Tomcat/IIS or anything like that).
So, I would like to "fix" it in Varnish, since I don't expect the maker of that software being able to fix this within a reasonable time. Is there a built in way in Varnish to make it generate it's own Last-Modified response header? Something like:
* If no stale object exists in cache, set Last-Modified to the value of the Date response header
* If a stale object exists in cache, and it's body content is identical to the newly fetched content, keep the Last-Modified from the step above
* If a stale object exists in cache, but it's body content is different to the newly fetched content, set Last-Modified to the value of the Date response header
Any suggestions on how to handle this situation? Any general Varnish guidelines when working with a backend that acts like this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the varnish-misc