From 1c58395bcaf90662073dc82232eb91460cb76fe3 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Fri, 16 Feb 2024 15:03:05 +0000 Subject: [PATCH] DEV: Disable service worker caching by default (#25723) Followup to c4559ae5751fce09b6d43f71887a310f7ba2670d --- config/discourse_defaults.conf | 2 +- spec/requests/static_controller_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/discourse_defaults.conf b/config/discourse_defaults.conf index dd954fd87c1..f2287665849 100644 --- a/config/discourse_defaults.conf +++ b/config/discourse_defaults.conf @@ -394,4 +394,4 @@ asset_url_salt = # disable service-worker caching. An 'offline' page will still be used as an offline fallback. # This flag is for a temporary experiment, and may be removed at any time -disable_service_worker_cache = false +disable_service_worker_cache = true diff --git a/spec/requests/static_controller_spec.rb b/spec/requests/static_controller_spec.rb index 849faff7ca7..01ad41be19e 100644 --- a/spec/requests/static_controller_spec.rb +++ b/spec/requests/static_controller_spec.rb @@ -319,7 +319,7 @@ RSpec.describe StaticController do get "/service-worker.js" expect(response.status).to eq(200) expect(response.content_type).to start_with("application/javascript") - expect(response.body).to include("workbox") + expect(response.body).to include("addEventListener") end it "replaces sourcemap URL" do