Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webpack log errors "net::ERR_SSL_PROTOCOL_ERROR" by calling sockjs-node/info

on front I use react on back .net core 3.1

on client I use webpack that is runned on localhost:8080

in Startup.cs I use proxyToSpa

 applicationBuilder.UseSpa(spa =>
                {
                    spa.UseProxyToSpaDevelopmentServer("http://localhost:8080/");
                });

on HTTP works as expected without any errors but on HTTPS I saw a lot of console errors and failed requests in Network there is failed requests for (sockjs-node/info?t=...) with error net::ERR_SSL_PROTOCOL_ERROR

enter image description here enter image description here

Is there any options to configure webpack or .net core project to avoid these error logs on HTTPS?

like image 892
Alex Avatar asked Oct 26 '25 06:10

Alex


2 Answers

This might be the issue, it worked for me

https://howchoo.com/chrome/stop-chrome-from-automatically-redirecting-https

If you ever visited the https version of a website (whether it resolved or not), Google Chrome might repeatedly send you to that version

like image 65
hi-ren Avatar answered Oct 28 '25 20:10

hi-ren


https://webpack.js.org/configuration/dev-server/#devserverdisablehostcheck

using cli

webpack-dev-server --disable-host-check

or in webpack config

devServer: {
        disableHostCheck: true
    }
like image 38
Alex Avatar answered Oct 28 '25 18:10

Alex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!