Somehow my environment has been changed such that every Angular project I enter and run ng serve command on now redirects to the https port. Even if I use --ssl false option, it still redirects to https.
I suspect that this is some change to the node environment. I've looked through environmental variables and combed the net trying to find ways of turning SSL OFF, but all I find are articles that speak of turning it ON. Most of them are VERY intentional changes to the Angular.json file or they are use a command that specifies the certificate and key.
If you could point me to the right documentation or put me on the right path, I would greatly appreciate it.
A Google Chrome redirect loop error occurs when the owner of a website changes their website URL (address) and the old one redirects you to the new one. Because this could be used maliciously, Google gives you an error when you try to reach the site.
In its default configuration, without explicit action by the user or the web site, no major browsers would automatically use HTTPS. If you redirect HTTP to HTTPS, make sure to mark your cookies as secure so you don't leak them in the initial accesses through http.
In the case of our company - it appears that it's related to a domain policy probably put in place by our IT Department.
One clue is the Network Traffic in chrome debugger: 307 Internal Redirect and the response header has: Non-Authoritative-Reason: HSTS
Try going to: chrome://net-internals/#hsts and if you have authority, deleting the policy for "localhost."
If you can't delete this, then I advice following the steps from this article which also worked for me: https://medium.com/@richardr39/using-angular-cli-to-serve-over-https-locally-70dab07417c8
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