Express cross-domain problem

create an express project by yourself, connect to the remote mysql, write interface, use the browser address to access successfully and get the data.

A front-end project is built using vue family buckets, and axios processes requests across domains.

Request header field timestamp is not allowed by Access-Control-Allow-Headers in preflight response.

added the following code, but still had no effect:

res.header("Content-Type", "text/plain");
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");

is there anything I need to set up for the axios request header?


Request header field timestamp is not allowed by Access-Control-Allow-Headers in preflight response.
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, timestamp ");

attach a link: https://www.cnblogs.com/king-.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ae56-2b9ca.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ae56-2b9ca.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?