diff --git a/.env_sample b/.env_sample index 6bcadb369..d409b7b41 100644 --- a/.env_sample +++ b/.env_sample @@ -1,10 +1,12 @@ +# Development options +export SKIP_SERVICEWORKERS="true" + # App core values export APP_DOMAIN="localhost:3000" export APP_PROTOCOL="http://" export APP_NAME="forem_local" export FOREM_OWNER_SECRET="secret" - # Openresty domain + Protocol setting for development export OPENRESTY_DOMAIN="" export OPENRESTY_PROTOCOL="" diff --git a/app/views/service_worker/index.js.erb b/app/views/service_worker/index.js.erb index 433e5f124..625f4b458 100644 --- a/app/views/service_worker/index.js.erb +++ b/app/views/service_worker/index.js.erb @@ -1,5 +1,5 @@ // Serviceworkers file. This code gets installed in users browsers and runs code before the request is made. -<% unless Rails.env.test? %> +<% unless Rails.env.test? || ENV["SKIP_SERVICEWORKERS"] == "true" %> const staticCacheName = 'static-1.2'; const expectedCaches = [ staticCacheName