XMLHttpRequest cannot load and Response for preflight has invalid HTTP status code 405
CORS actually specifies that two requests should be made to the server on an AJAX call (if certain conditions apply, like sending custom headers). The first request (the one with the OPTIONS method) is called pre-flight and is used to check if it’s safe to send the full request to the server. The response from … Read more