icestark icon indicating copy to clipboard operation
icestark copied to clipboard

[QUESTION]如何请求mode改为no-cors

Open xmsz opened this issue 1 year ago • 1 comments

Do you want to request a feature or report a bug? feature

What is the current behavior? 正常会出现 image 然后如果是这样可以成功

fetch("https://htsy.cpshelp.cn/client-modules/setting/runtime.json?v=1684313213887", {
  "headers": {
    "accept": "*/*",
    "accept-language": "zh-CN",
    "sec-ch-ua": "\"Not A(Brand\";v=\"24\", \"Chromium\";v=\"110\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"Windows\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "cross-site"
  },
  "referrer": "http://localhost:1212/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": null,
  "method": "GET",
  "mode": "no-cors",
  "credentials": "omit"
});

需求

  • 在哪可以设置fetch的mode为no-cors?

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

What is the expected behavior?

xmsz avatar May 17 '23 09:05 xmsz

自定义下 fetch https://micro-frontends.ice.work/docs/api/ice-stark/#fetch

ClarkXia avatar May 31 '23 02:05 ClarkXia