Summary
That's all, folks! You have learned the important elements of securing a web application using cross-site resource sharing.
In this chapter, we discussed some of the best practices in applying CORS.
We started by talking about enabling the API to accept public CORS requests. Then we discussed the limiting of API to allow CORS requests to a whitelisted set of origins.
Later, we discussed the best practices in protecting against cross-site request forgery (CSRF).
Finally, we saw the various options for minimizing the preflight requests from browsers to servers.
Now you know every aspect of applying CORS, and you can be very confident about suggesting various techniques and best practices in handling cross-site resource sharing.