【问题标题】:The page at https://lyrics-chords.herokuapp.com/ was not allowed to display insecure content from http://localhost:8000/auth/userhttps://lyrics-chords.herokuapp.com/ 的页面不允许显示来自 http://localhost:8000/auth/user 的不安全内容
【发布时间】:2021-09-13 02:29:42
【问题描述】:

我刚刚创建了一个 Django-React 应用程序并将更改推送到 Heroku。前端(JS和CSS)出现在网站上没问题,但是对后端的请求导致如下错误:

[blocked] The page at https://lyrics-chords.herokuapp.com/ was not allowed to display insecure content from http://localhost:8000/auth/user

我已上网查询,但似乎没有人收到相同的错误消息。咨询朋友,好像我必须https保护我的后端,并进一步研究该主题,似乎没有免费的方式上传SSL / TSL证书(参考:heroku: set SSL certificates on Free Plan?)。有解决办法吗?

【问题讨论】:

    标签: django http heroku https


    【解决方案1】:

    我真傻,真的。原来,localhost:8000 指的是用户的计算机。 https://lyrics-chords.herokuapp.com/ 是后端和前端的服务器,因此更新后端 URL 调用就足够了。

    【讨论】:

    • 名声不错的 lmao
    猜你喜欢
    • 1970-01-01
    • 2019-07-13
    • 2013-04-27
    • 2013-04-25
    • 2011-05-02
    • 2013-07-13
    • 1970-01-01
    • 2012-06-09
    • 2012-10-19
    相关资源
    最近更新 更多