Part 3. Debugging CORS requests
The previous two parts of this book focused on how CORS works from both the client’s and the server’s perspective. Because there is both a client- and server-side component to CORS, there are many places where things can go wrong, and debugging these issues can be difficult.
Chapter 7 provides details on how to debug CORS requests. It starts by introducing you to the browser’s developer tools. These developer tools provide a lot of insightful information about CORS requests, including any CORS-related errors, and a view into the request and response headers. If the developer tools aren’t sufficient, the chapter looks at Wireshark, which is a tool that analyzes network traffic. Wireshark can help shed some light on why CORS requests are failing.
Next, the chapter looks at other tools that can be useful for debugging CORS requests, such as curl and test-cors.org. Then the chapter moves on to tips for debugging requests from mobile devices. Finally, the chapter covers where to go to get help on CORS-related issues.