chrome://flags/#allow-insecure-localhost

Chrome://flags/#allow-insecure-localhost < 2024 >

: Ensure your Chrome browser is up to date, as the behavior of flags can shift between versions.

That’s it. Now you can run http://localhost:8080 and Chrome will treat it as a secure context for local testing.

Typically, developers use self-signed certificates to simulate HTTPS. While the server encrypts the traffic, Chrome sees these certificates as "invalid" because they are not signed by a trusted Certificate Authority (CA). chrome://flags/#allow-insecure-localhost

Mastering chrome://flags/#allow-insecure-localhost : A Guide for Web Developers

If you’ve ever tried to test a service worker, a geolocation API, or any "secure context" feature on a local development server, you’ve likely run into this error: : Ensure your Chrome browser is up to

To implement this feature, the following code changes are required:

This feature is documented in the Chrome flags documentation: chrome://flags > allow-insecure-localhost . "Relax the security rules for localhost

"Relax the security rules for localhost . Let me run HTTP on localhost even if the rest of the world needs HTTPS."