小编Pab*_*res的帖子

在 Netlify 上部署我的网站后,来自 newsapi.org 的错误 426

当我在本地主机上尝试我的项目时,它运行良好,因为我遇到了 CORS 问题,所以使用https://cors-anywhere.herokuapp.com/。但是一旦我在 Netlify 上部署了该站点,无论是否使用https://cors-anywhere.herokuapp.com/,它都会给我错误 426(需要升级)。这些是出现在我的控制台上的消息:

>Failed to load resource: the server responded with a status of 426 (Upgrade Required)

>Error: Request failed with status code 426
    at createError.js:16
    at settle.js:17
    at XMLHttpRequest.<anonymous> (xhr.js:61)
Run Code Online (Sandbox Code Playgroud)

我一直在寻找,有些人似乎有类似的问题。我见过像拥有自己的服务器来传递请求这样的解决方案,但我不知道该怎么做,如果我错了,请纠正我,这与使用https://cors-anywhere 不一样。 herokuapp.com/ ?

https http netlify cors-anywhere

3
推荐指数
1
解决办法
2595
查看次数

标签 统计

cors-anywhere ×1

http ×1

https ×1

netlify ×1