Heroku不使用React应用程序更新配置变量

时间:2019-10-23 18:07:11

标签: javascript reactjs variables heroku environment-variables

我在Heroku上部署了react应用,我对Config Vars(env变量)有问题。我在设置中更改了它们,但它们没有更新。

在发送XHR请求时,由于旧的一个env变量正与HTTP一起启动,因此出现错误Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '<URL>'. This request has been blocked; the content must be served over HTTPS.,因此我决定将其更改为HTTPS。 Env变量未更新。

REACT_APP_SERVER1="https://my-app.herokuapp.com"

感谢帮助

1 个答案:

答案 0 :(得分:0)

NodeJS mongoDB应用程序遇到类似的问题。