Revert "FEATURE: Normalize the service worker route (#8359)"

This reverts commit 9799a651b6.
This commit is contained in:
Jeff Wong
2019-11-20 14:10:17 -08:00
parent 0b284d3d8b
commit c6d8dbd4a9
4 changed files with 4 additions and 31 deletions

View File

@@ -68,19 +68,6 @@ task 'assets:precompile:css' => 'environment' do
end
end
task 'assets:flush_sw' => 'environment' do
begin
hostname = Discourse.current_hostname
default_port = SiteSetting.force_https? ? 443 : 80
port = SiteSetting.port.to_i > 0 ? SiteSetting.port : default_port
STDERR.puts "Flushing service worker script"
`curl -s -m 1 --resolve '#{hostname}:#{port}:127.0.0.1' #{Discourse.base_url}/service-worker.js > /dev/null`
STDERR.puts "done"
rescue
STDERR.puts "Warning: unable to flush service worker script"
end
end
def assets_path
"#{Rails.root}/public/assets"
end