Add CORS middleware for api

Merged Thom Wiggers requested to merge api/cors into master

Handle CORS

Merge request reports