net :: ERR_INSECURE_RESPONSE将heroku应用程序部署到谷歌域名

时间:2017-09-26 03:07:00

标签: google-chrome ssl heroku dns cname

我在http://employbl.herokuapp.com设置了一个heroku应用。我在google域名上拥有employbl.com域名,因此我希望雇佣employeebl.com和www.employbl.com来呈现在heroku上托管的网站。

我将域名添加到heroku配置:

$ heroku domains:add www.employbl.com
 ▸    heroku-cli: update available from 6.13.13 to 6.14.27-c74500f
Adding www.employbl.com to ⬢ employbl... done
 ▸    Configure your app's DNS provider to point to the DNS Target
 ▸    www.employbl.com.herokudns.com.
 ▸    For help, see https://devcenter.heroku.com/articles/custom-domains

The domain www.employbl.com has been enqueued for addition
 ▸    Run heroku domains:wait 'www.employbl.com' to wait for
 ▸    completion
$ host www.employbl.com
www.employbl.com is an alias for www.employbl.com.herokudns.com.
www.employbl.com.herokudns.com has address 23.21.222.104
www.employbl.com.herokudns.com has address 23.23.118.21
www.employbl.com.herokudns.com has address 23.23.151.35
www.employbl.com.herokudns.com has address 174.129.214.98
www.employbl.com.herokudns.com has address 23.21.245.33
www.employbl.com.herokudns.com has address 23.21.55.239
www.employbl.com.herokudns.com has address 54.225.70.24
www.employbl.com.herokudns.com has address 23.21.228.1

在Google Domains控制台中,我创建了一个自定义资源记录和合成记录here并在heroku docs

中指定

enter image description here

enter image description here

应用程序在employbl.herokuapp.com上呈现正常,但是当我导航到www.employbl.com时,HTML呈现给我的应用程序,但Javascripts和CSS没有。它是一个Vue.js应用程序,因此在浏览器中不会呈现任何内容。在控制台中我收到一个错误:

GET https://www.employbl.com/css/app.css net::ERR_INSECURE_RESPONSE
www.employbl.com/:37 
GET https://www.employbl.com/js/app.js net::ERR_INSECURE_RESPONSE

如何配置google domains和heroku以便一起玩,并在www.employbl.com网址上呈现我的heroku托管应用程序?

我正在运行OSX sierra和最新的Chrome版本

1 个答案:

答案 0 :(得分:0)

事实证明,在我的应用服务提供商(Laravel)中,我正在为所有请求强制使用HTTPS。一旦我将其关闭,它就会正确呈现