Finished implementation of CORS support in the REST API.