CORS support
Merge pull request #1223 from modilabs/cors

CORS support on API