首页 > 解决方案 > 将 React 应用程序上传到 Netlify 并收到 401

问题描述

这是我的 netlify 商店的链接 - https://find-my-rescue.netlify.app/

这是我的 GitHub 链接 - https://github.com/mrshawnhum/capstone-starter-mrshawnhum

当我在我的 VS 代码中运行 Yarn Start 时,一切都已加载并运行。然而,我部署到 Netlify,我收到了关于我的 api 的这条消息。

{"type":"https://httpstatus.es/401", "status":401, "title":"Unauthorized", "detail":"Access token 无效或过期"}

它不应该是我的访问令牌,因为当我给它一个 api 密钥和密钥时,我使用了来自 github 的 petfinder-sdk 来生成我的令牌密钥。

标签: reactjsgithubnetlifyhttp-status-code-401

解决方案


推荐阅读