我在Herbase上部署了一个节点服务器,在Firebase上部署了客户端Angular应用程序,但我遇到了这个问题。请帮我摆脱这个。
Mixed Content: The page at 'https://newone-2754f.firebaseapp.com/#/login'
was loaded over HTTPS, but requested an insecure XMLHttpRequest
endpoint 'http://localhost:8080/authenticate'.
This request has been blocked; the content must be served over HTTPS.
(anonymous) @ angular.js:12011
sendReq @ angular.js:11776
serverRequest @ angular.js:11571
processQueue @ angular.js:16383
(anonymous) @ angular.js:16399
$eval @ angular.js:17682
$digest @ angular.js:17495
$apply @ angular.js:17790
(anonymous) @ angular.js:25890
defaultHandlerWrapper @ angular.js:3497
eventHandler @ angular.js:3485
angular.js:12011 XMLHttpRequest cannot
load http://localhost:8080/authenticate. Failed to start loading.
(anonymous) @ angular.js:12011
sendReq @ angular.js:11776
serverRequest @ angular.js:11571
processQueue @ angular.js:16383
(anonymous) @ angular.js:16399
$eval @ angular.js:17682
$digest @ angular.js:17495
$apply @ angular.js:17790
(anonymous) @ angular.js:25890
defaultHandlerWrapper @ angular.js:3497
eventHandler @ angular.js:3485
答案 0 :(得分:0)
部署代码时,似乎http请求端点(nodejs api端点)仍然是本地端点。纠正端点
was loaded over HTTPS, but requested an insecure XMLHttpRequest
endpoint 'http://localhost:8080/authenticate'.
^^^^^^^^^^^^^^^^ // Add heroku app url there
This request has been blocked; the content must be served over HTTPS.