title: How to add headers on Nuxt static files response?
body: <p>I have a json file on static folder and I'm trying to access it from another web site, but I'm having problem with the CORS. </p>
  
  <p>How can I add headers (like Access-Control-Allow-Origin) on the static files response? </p>
  
  <p>I tried this <a href="https://github.com/nuxt/nuxt.js/issues/2554#issuecomment-363795301" rel="nofollow noreferrer">https://github.com/nuxt/nuxt.js/issues/2554#issuecomment-363795301</a>, but didn't work for static files.</p>
  
  <pre><code>module.exports = function (req, res, next) {
      res.setHeader('Access-Control-Allow-Origin', '*');
      res.setHeader('Access-Control-Allow-Headers', '*');
      res.setHeader('Access-Control-Allow-Methods', '*');
      next()
  }
  </code></pre>