title: Auto-versioning CSS/JS in nginx
body: <p>I have a setup where nginx is serving all static content (CSS/JS).
  Our problem is that when we update the static content the browser doesn't necessarily update them immediately, causing problems when we're pushing new versions.</p>
  
  <p>I would like to have a nginx plugin that basically replaces all calls to CSS/JS and ads a versioning number, like this:</p>
  
  <p>Before:</p>
  
  <pre><code>&lt;link rel="stylesheet" type="text/css" href="/media/css/style.css" /&gt;
  </code></pre>
  
  <p>After:</p>
  
  <pre><code>&lt;link rel="stylesheet" type="text/css" href="/media/css/style.css?3428432" /&gt;
  </code></pre>
  
  <p>And does this automatically based on the latest changed date on the style.css file itself. So I don't have to update the HTML.
  Is there a plugin for this? I know Googles mod_pagespeed does simliar things in their apache2 module.. but I can't find anyone for nginx.</p>