mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Revert "FEATURE: Normalize the service worker route (#8359)"
This reverts commit 9799a651b6.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user