For web developers, the "allow-insecure-localhost" flag in Microsoft Edge was a handy tool. It allowed developers to bypass SSL certificate errors when working on local development environments. However, many developers noticed its disappearance in Edge version 88.0.705.50, causing some confusion and workflow disruptions. This article dives into the reasons behind its removal and provides several workarounds to allow insecure localhost connections.
Initially, the removal of the allow-insecure-localhost
flag seemed unintentional. As reported by users on Stack Overflow, the flag reappeared in later versions of Microsoft Edge, specifically version 89.0.767.0. This suggested that the flag's absence in version 88 was a temporary glitch.
However, the long-term fate of this flag was sealed by a decision made in the Chromium project, the open-source project that powers Microsoft Edge. The expiration version for the flag was modified, meaning that after a certain version (M130) of Chromium, the flag would be permanently removed.
While the direct flag is no longer a permanent solution, several workarounds exist to enable insecure localhost connections in Microsoft Edge:
Using the "Temporarily Unexpire Flags" Feature (Versions 119-133):
edge://flags
.#allow-insecure-localhost
again.Edge Policies (Version 133 and Later):
SSLErrorOverrideAllowedForOrigins
to ["https://localhost"]
specifically allows insecure connections for localhost. Refer to Microsoft Edge Policies for more information.While these workarounds are helpful, it's essential to consider that allowing insecure connections poses security risks. Here are some safer alternatives:
While the allow-insecure-localhost
flag provided a convenient shortcut, its removal highlights the importance of secure development practices, even in local environments. By using self-signed certificates or other secure alternatives, developers can ensure that their applications are secure from the start. Consider exploring options like mkcert to simplify the process of creating locally trusted development certificates.