Adding optional CORS support