Request header field x-access-token is not allowed by Access-Control-Allow-Headers
问题 I am stuck with this error. please help.. XMLHttpRequest cannot load. Request header field x-access-token is not allowed by Access-Control-Allow-Headers. 回答1: Your server should return that it accepts custom headers (like x-access-token). For example, if you are using nodejs with expressjs, try this: app.use(function(req, res, next) { res.header("Access-Control-Allow-Origin", "*"); // keep this if your api accepts cross-origin requests res.header("Access-Control-Allow-Headers", "Origin, X