Localhost sent an invalid response for my angular app

旧街凉风 提交于 2019-12-23 09:07:16

问题


I have a project in my local created with springBoot, java, jHipster, Angular, etc and I want to run it. Usually I have used mvnw to run the project. Now I changed computer so when running mvnw in cmd it says app running in https://localhost:8080 and when I go to this link I cannot have access to the app.

This is the message:

This site can’t provide a secure connection
localhost sent an invalid response.
Try running Windows Network Diagnostics.
ERR_SSL_PROTOCOL_ERROR

Maybe I need to install apache so I can access to the projects in localhost? I do not remeember if I had apache installed in my old pc wheer I could access to teh app.

I did netstat -ano | findstr 8080 in cmd and found in task manager that port 8080 is used by java.exe. Maybe it is a port issue? Thanks!


回答1:


You have to use the HTTP protocol instead, as you don't need to use a SSL Certificate.

Change it from:

https://localhost:8080

To:

http://localhost:8080

Then you should not have the error again.




回答2:


This is normal behavior because you don't use the https protocol.



来源:https://stackoverflow.com/questions/52677872/localhost-sent-an-invalid-response-for-my-angular-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!