SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
----- Solution
1. go to : node_modules/react-dev-utils/webpackHotDevClient.js file
2. Update 62 line
// Connect to WebpackDevServer via a socket.
var connection = new WebSocket(
url.format({
//protocol: 'ws',
protocol: window.location.protocol === 'https:' ? 'wss' : 'ws',
hostname: window.location.hostname,
port: window.location.port,
// Hardcoded in WebpackDevServer
pathname: '/sockjs-node',
})
);
No comments:
Post a Comment