I get this error message when trying to add a new post using the User API key feature.
As discussed previously for different values, I think Content-Type should be also added to Access-Control-Allow-Headers header as defined in discourse/config/initializers/008-rack-cors.rb at main · discourse/discourse · GitHub
Here is a PR that fixes this little bug.