谷歌浏览器控制台输入JS代码检测请求地址是否跨域访问
var token= "your token";
var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://d-web.keenlon.cn/gateway/code');
xhr.setRequestHeader("x-access-token",token);
xhr.send(null);
xhr.onload = function(e) {
var xhr = e.target;
console.log(xhr.responseText);
}
转载:https://blog.csdn.net/weixin_44260806/article/details/130105172