Adds support for CORS

#391