title: Prevent bundle from responding if cache buster doesn't match content
body: <p>I'm using Bundling and Minification across a server farm where there is a cross-over period of old and new servers.</p>
  
  <p>The issue I have is that the old servers are caching the content of the new bundle cache buster URL.</p>
  
  <hr>
  
  <p>For example the <strong>new</strong> HTML is cached with the <strong>new</strong> bundle URL:</p>
  
  <pre><code>&lt;script src="/bundle.css?v=RBgbF6A6cUEuJSPaiaHhywGqT7eH1aP8JvAYFgKh"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This then makes a request to an <strong>old</strong> server which hasn't yet been updated with the new CSS code and this then cached.</p>
  
  <p>Any subsequent calls to the <strong>new</strong> bundle URL will then return the old code.</p>
  
  <hr>
  
  <p>Therefore is there a way of checking that the content of the bundle matches the hashed cache buster? And if it doesn't throw a 404 for example.</p>
  
  <p>Using my example above when the request goes back to the old server for the bundle it would check the contents of the bundle, generate a content hash and compare this to the querystring.</p>
  
  <p>In this instance the cache-buster wouldn't match the actual content hash and a 404 would be returned.</p>
  
  <p>Eventually a user would hit a <strong>new</strong> server with the bundle request and the correct content would be cached.</p>
  
  <hr>
  
  <p><a href="https://i.stack.imgur.com/cCe2U.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/cCe2U.jpg" alt="enter image description here"></a></p>