Does what enforce it? The browser does, that's why you need to set CORS on your local node for it to work. What's the scenario you're thinking of?
So javascript in an essay can access/put the API.
I didn't really look into it too much, just wanted to give a pointer that this might need to be considered. In the sense that it might have security implications.