title: CORS will not enable with MAMP localhost
body: <p>I've built a RESTful Api in PHP on a local machine and everything is working perfectly. Preflight requests are sending the correct responses etc, everything handled by PHP is working like a dream.</p>
  
  <p>But if I try to access an image in a public folder (programatically via javascript in this instance) I'm getting the infuriating : </p>
  
  <pre><code>Access to XMLHttpRequest at 'http://localhost/tmp/avatars/user.jpg' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  </code></pre>
  
  <p>I've set the following in the <code>.htaccess</code> file in the public root dir, and in the MAMP Apache <code>&lt;Directory&gt;</code> and <code>&lt;VirtualHost&gt;</code> directives but it is just refusing to work. </p>
  
  <pre><code>Header set Access-Control-Allow-Origin "*"
  Header set Access-Control-Allow-Methods "*"
  </code></pre>
  
  <p>CORS is a pain in the arse at the best of times, but this is just ridiculous. Why isn't this working?</p>
  
  <p>Any ideas?</p>