![](/img/trans.png)
[英]How to solve CORS error in NodeJS independent of CORS middleware
[英]How to solve the error CORS ? mode: 'no-cors'
const result = await fetch(https://example.com', {
method: 'POST',
mode: 'no-cors',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({"username": "Jochan","countFollowers": 60001}),
});
我正在嘗試向第三方 API 發送請求,出現錯誤,我該如何解決? 錯誤:POST https://example.com net::ERR_ABORTED 500(內部服務器錯誤)
您無權從未設置適當標頭的 API 獲得響應。 如果它既不是你的 API 也不是公共的,你只能嘗試使用谷歌搜索中的 CORS 代理進行一些黑客攻擊
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.