我正在尝试在Heroku上部署react / node应用程序。该网站位于此处:https://rift-website-3.herokuapp.com/。
我收到一个控制台错误,该网站正在尝试连接到websocket。这是错误:
Dim iRow As Long
Dim ws As Worksheet
Set ws = Worksheets("Name")
'find first empty cell in column F (coming up from the bottom) and return row number
iRow = ws.Range("F:F").Find(What:="*", SearchOrder:=xlRows, SearchDirection:=xlPrevious, LookIn:=xlValues).Row + 1
我对Mixed Content: The page at 'https://rift-website-3.herokuapp.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://localhost:3000/sockjs-node/info?t=1471044468173'.
This request has been blocked; the content must be served over HTTPS.
有点新鲜,为什么我的应用尝试连接到websocket?
server.js
Express
其中 index.html :
var express = require('express');
var app = express();
app.set('port', (process.env.PORT || 5000));
app.use(express.static(__dirname + '/public'));
app.listen(app.get('port'), function() {
console.log('Node app is running on port', app.get('port'));
});
加载 index.js :
<!doctype html>
<html>
<head>
<title>Sample App</title>
</head>
<body>
<div id='root'>
</div>
<script src="/bundle.js"></script>
</body>
</html>
加载 App.js :
import 'babel-polyfill';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './containers/App';
ReactDOM.render(<App />, document.getElementById('root'));