Chrome提示:XMLHttpRequest cannot load

解决办法:

新建chrome快捷方式,右键该快捷方式属性——快捷方式——目标选项后加入:--allow-file-access-from-files


fetch("https://alphadrive.byd.com/vehicle-client/vehicles/v1/list", { "headers": { "accept": "application/json, text/javascript, */*; q=0.01", "accept-language": "zh-CN,zh;q=0.9", "content-type": "application/json; charset=UTF-8", "sec-ch-ua": "\" Not A;Brand\";v=\"99\", \"Chromium\";v=\"96\", \"Google Chrome\";v=\"96\"", "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": "\"Windows\"", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin", "x-requested-with": "XMLHttpRequest", "Authorization":"Bearer eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE3NDE5MjQyOTksInN1YiI6ImZlbmcud2VueGlhbmcxIiwiY3JlYXRlZCI6MTc0MTkyNDI5OTI4OSwiZGV2aWNlIjoid2ViIn0.2AAPDx8CNoxDBdeoD_uL8EawJm7gmSjUSXoG6ZICfIZgatK6dpqt882UNZe_TO66NIKrRC8goXwZIxbV2nlnWg" }, "referrerPolicy": "origin-when-cross-origin", "body": { "conditions":{ "pageNum":1, "pageSize":10, "vinList":["LC0CE4DC3S4484192"] }, "respFields":[] }, "method": "POST" }); VM324:1 Connecting to 'https://alphadrive.byd.com/vehicle-client/vehicles/v1/list' violates the following Content Security Policy directive: "connect-src chrome://resources chrome://theme 'self'". The action has been blocked. VM324:1 Fetch API cannot load https://alphadrive.byd.com/vehicle-client/vehicles/v1/list. Refused to connect because it violates the document's Content Security Policy. Promise {<rejected>: TypeError: Failed to fetch at <anonymous>:1:1} VM324:1 Uncaught (in promise) TypeError: Failed to fetch. Refused to connect because it violates the document's Content Security Policy. at <anonymous>:1:1
最新发布
12-05
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值