Pre-flighted JavaScript requests
PUT request with missing Options API
Summary
JavaScript code can make a cross-origin PUT
request.
An API must exist to service the pre-flight OPTIONS
request, otherwise the browser won’t make the main request.
Instructions
- Press F12 to open browser Developer Tools
- Open Network tab and filter by path no-options-api
- Hit green button below and see that request fails
- Verify that pre-flight request received a 404 Not Found response
View source on GitHub | Created by Tom Gregory