Adjusted CORS functionality to allow OPTIONS requests to pass through