首页 文章

现在,在Heroku上部署的路径不再有效

提问于
浏览
-1

在本地运行时,我使用的是端口1337,我将使用如下路径:

xhr.open('GET', 'http://localhost:1337/user/login/' + name + '/' + title + '/' + points);

但现在我得到一个错误,上面写着:

页面位于'https://bubsta.herokuapp.com/ ' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ' http://localhost:1337/login/someword/someword' . 此请求已被阻止;内容必须通过HTTPS提供 .

如何更改文件中的 endpoints 以匹配Heroku上使用的端口?我正在使用的.listen是这样的:

app.listen(process.env.PORT || 1337);

1 回答

  • 0

    我能够解决它 . 我刚刚将localhost:1337更改为heroku分配给我的新网址,即bubsta.herokuapp.com

相关问题