question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proxy assets to http local over a https site, the sock-js request used a wrong https protocol.

See original GitHub issue

Do you want to request a feature or report a bug? report a bug

What is the current behavior? HRM not work.

If the current behavior is a bug, please provide the steps to reproduce. I set up a http dev-server, proxy ‘https’ assets to the ‘http’ dev-server over a ‘https’ site. the sock-js request goes to use the https protocol. Because of the dev-server runs on a http protocol, https request would not be processed.

What is the expected behavior? the sock-js request use http protocol.

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System. Webpack version: 2.3.3 Node.js version: 6.9.5
OS: Mac OS 10.12.5

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
orangeyyycommented, May 14, 2018

Hi @sokra I have got the same problem, the steps to reproduce the problem is shown as below: 1, start a webpack dev server at local which is use http; 2,start a proxy server to proxy the resource online to local(the online site use https),in this case we can debug the online website at local;

everything is ok now except the HMR, the screen is shown below : default the reason of this problem is that HMR send the sockjs-node request with https protocol which is same with the online site, so I wander to know if we can set the protocol of the sockjs-node request to http and the problem will be resolved.

http: image

https: image

sorry that this case need use a online https website so is hard for me to provide a test case repo, hope you can understand what say above

0reactions
id77commented, Mar 29, 2019

@evilebottnawi This https site service is not built by me, and how to set up ssl in intranet ip

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebSocket connection failed. Error during ... - Stack Overflow
I'm having a similar issue with websockets and nginx and i think the issue might be proxy too. I don't get any error...
Read more >
DevServer - webpack
This object is passed straight to the Node.js HTTPS module, so see the HTTPS documentation for more information. To pass your own certificate...
Read more >
Securing HTTP Traffic to Upstream Servers | NGINX Plus
Secure HTTP traffic between NGINX or NGINX Plus and upstream servers, using SSL/TLS encryption. This article explains how to encrypt HTTP traffic between ......
Read more >
How to fix a website with blocked mixed content - Web security
If your website delivers HTTPS pages, all active mixed content delivered via HTTP on this pages will be blocked by default.
Read more >
Cannot use SSL in development with webpack - GitLab.org
Uncaught Error: SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS at new SockJS ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found