Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xmsz opened this issue May 17, 2023 · 1 comment
Open

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

xmsz opened this issue May 17, 2023 · 1 comment

Comments

@xmsz
Copy link

xmsz commented May 17, 2023

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?

@ClarkXia
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants