Request header field <field-name> is not allowed by Access-Control-Allow-Headers in preflight response
问题 I have a React app that is trying to make an axios request to my Express server to find a user in a Mongo database. Before, I built the back-end on Rails and had a gem for CORS, and after trying to configure CORS on the Express side, I can't seem to find a solution. I want to be able to pass in a custom field in headers (i.e. username) so I can use that field to query against my database. Error I get in browser: XMLHttpRequest cannot load http://localhost:3000/api/users/test. Request header