yangzailu

导航

在浏览器中检测接口是否支持跨域请求

#####在浏览器中检测接口是否支持跨域请求

fetch("https://api.gjiaying.cn/api/web/getkey?t=1750917988205&_=1750917988153", {
  "headers": {
    "accept": "*/*",
    "accept-language": "zh-CN,zh;q=0.9",
    "priority": "u=0, i",
    "request-by": "ajax-request-tag",
    "sec-ch-ua": "\"Chromium\";v=\"130\", \"Google Chrome\";v=\"130\", \"Not?A_Brand\";v=\"99\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "cross-site"
  },
  "referrer": "https://www.org.cn/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": null,
  "method": "POST",
  "mode": "cors",
  "credentials": "omit"
});

右击浏览器,选择检查

 

数据来源可以在请求方的控制台中查看

例如:copy/copy as fetch

 

posted on 2025-06-26 16:21  飞离地平线  阅读(147)  评论(0)    收藏  举报