I have a dotnet core app that is configured to use HTTPS and I have configured it to UseSpa but I am seeing a lot of errors in the console and I believe it is due to something (either the proxy or webpack) using https instead of http.
VM3850:1 GET https://localhost:8080/sockjs-node/info?t=1564649931199 net::ERR_SSL_PROTOCOL_ERROR
I have tried to set https and http2 to false within the webpack.config devServer section.
I have tried using webpack-dev-server/client?http://${opts.host}:${opts.port}/
but it is still using https
{
if (env.IsDevelopment())
spa.UseProxyToSpaDevelopmentServer("http://localhost:8080");
});```
Ultimately I am trying to get access my site on https at https://localhost:5001 and have it use the proxy to communicate to my SPA at http://localhost:8080.
If it set webpack to use https, UseProxyToSpaDevelopmentServer to use "https://localhost:8080" and trust the certificate it will work.
I gave up on this and bit the bullet.
I turned on HTTPS and configured a self signed certificate for use locally.
I created a script which may help people if they are trying to do the same thing.
https://gist.github.com/4imble/4aafecf261bfc8732f235498be6a3fa2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With