nicolaiarocci/eve — pull request #532 by joshvillbrandt (2014-12-17 20:43:00+00:00)
Title: Add support for multiple origins when using CORS

This pull requests add support for multiple origin when using CORS headers.

Backstory:

I have multiple web sites (multiple domains) that utilize one common Eve API. If I access a resource through the first site, everything is fine, but if I access that same resource through the second site, I gets a CORS HTTP error because the browser has cached the response sent from the first site (`Access-Control-Allow-Origin: site1`.)

The [W3C CORS recommendation page](http://www.w3.org/TR/cors/#resource-implementation) suggests that hosts intending to serve to multiple origins should either return `Access-Control-Allow-Origin: *` or, if the origin is specified in that header, to add a `Vary: Origin` header. I think the easiest option is option #1 and that is what is implemented in this pull request.