0đź‘Ť
This is part of your web browser and your web server.
It basically stops malicious attacks, e.g.
- You visit
my-innocent-blog.com
and it has a “Like my website” button - You click it, and it sends a request to StackOverflow to delete your account.
- StackOverflow servers receive the DELETE request, with the origin being
my-innocent-blog.com
, and it tells your web browser “That request should only originate from our own website”. - Your web browser says “Okay, I’ll ignore the request and throw a CORS error”
Thus protecting you from accidentally being tricked into deleting your account (or worse).
If you’re using an ExpressJS server, check out their CORS package.
https://github.com/expressjs/cors
Otherwise, just search ” CORS” on Google and you’ll find something for pretty much everything.
- [Vuejs]-How to check in a component which classes were applied to it?
- [Vuejs]-Vue JS mutating prop with Alert component
Source:stackexchange.com