CORS support

Adds support for CORS requests to API server