我遇到了 CORS 错误,因为服务器期望接收 User-Api-Key 头。我检查了 OPTIONS 响应中预期的请求头,确认正是如此。本论坛其他位置有一个类似的主题,有用户在从 JavaScript 应用调用时也遇到了这个问题。
tdekoekkoek
(Trevor de Koekkoek)
5
相关话题
| 话题 | 回复 | 浏览量 | 活动 | |
|---|---|---|---|---|
| API CORS Headers Incorrect | 10 | 3082 | 2020 年7 月 6 日 | |
| Acess-Control-Allow-Headers CORS Error with API after updating discourse | 9 | 3314 | 2020 年7 月 22 日 | |
| Having issue accessing the Discourse APIs from react app | 6 | 929 | 2023 年4 月 10 日 | |
| Authenticating using API keys when accessing API through fetch | 4 | 1511 | 2019 年11 月 28 日 | |
| Getting an error while trying to fetch individual posts | 1 | 912 | 2022 年4 月 14 日 |