From dc93c1b4338c9924305a38c7c930fcf20657b4fd Mon Sep 17 00:00:00 2001 From: Jeff Wong Date: Tue, 8 May 2018 10:39:02 -0700 Subject: [PATCH] FIX: temporary redirect for service worker scripts --- config/routes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/routes.rb b/config/routes.rb index f3c0a2a26af..4d80bf836ec 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -728,7 +728,7 @@ Discourse::Application.routes.draw do # current site before updating to a new Service Worker. # Support the old Service Worker path to avoid routing error filling up the # logs. - get "/service-worker.js" => redirect(relative_url_root + service_worker_asset), format: :js + get "/service-worker.js" => redirect(relative_url_root + service_worker_asset, status: 302), format: :js get service_worker_asset => "static#service_worker_asset", format: :js elsif Rails.env.development? get "/service-worker.js" => "static#service_worker_asset", format: :js