DEV: Do not install service workers in development (#12708)

DEV: Do not install service workers in development (#12708)

diff --git a/app/assets/javascripts/discourse/app/initializers/register-service-worker.js b/app/assets/javascripts/discourse/app/initializers/register-service-worker.js
index f163197..22b54a6 100644
--- a/app/assets/javascripts/discourse/app/initializers/register-service-worker.js
+++ b/app/assets/javascripts/discourse/app/initializers/register-service-worker.js
@@ -4,9 +4,7 @@ export default {
   name: "register-service-worker",
 
   initialize(container) {
-    const isSecured =
-      document.location.protocol === "https:" ||
-      location.hostname === "localhost";
+    const isSecured = document.location.protocol === "https:";
 
     if (isSecured && "serviceWorker" in navigator) {
       let { serviceWorkerURL } = container.lookup("session:main");

GitHub sha: b5fba751

This commit appears in #12708 which was approved by pmusaraj. It was merged by Falco.