MS Edge - disable auto HTTPS for localhost
edge browser security
How to disable automatic redirect to HTTPS for localhost.
May 17, 2023
I noticed recently that logging into various CLI tools (Azure DevOps CLI, GitHub, etc.) wasn't working for me - browser window opened, I signed in, gave permissions, and ended with an invalid request on
What happens is a normal browser OAuth flow, which opens redirect to
localhost with authorization code when done. The problem was that my Microsoft Edge started forcing HTTPS. Even when I manually changed the URL in the address bar to
http://localhost..... it still changed it.
Solution? Remove HSTS security policy in the browser.
- Go to
- In the Delete domain security policies section type
localhostas the Domain.
- Click Delete.
http://localhost should work again.
Found something inaccurate or plain wrong? Was this content helpful to you? Let me know!