localhost 自动被 redirect 到 https 地址的问题

localhost 自动被 redirect 到 https 地址的问题

不知道为什么, asp.net core web api 项目启动以后自动将 http://localhost 重定向到了 https://localhost, 我并没有添加任何 hsts 的中间件, 所以并不是这个原因, 而且代码之前是好使的, 但是由于我安装了某个证书后, 导致出现了这个问题.

尝试的解决方案

执行 delete

清空浏览器数据

清除浏览器数据后, 到 hsts setting 里面再次 query 一下:

not found.

此时重新 debug 就没有问题了.

分享此解决方案, 希望能够帮助到同样遇到这个问题的同学.

posted @ 2020-09-13 21:04  YanyuWu  阅读(750)  评论(0编辑  收藏  举报