mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
FEATURE: Normalize the service worker route (#12343)
Re-lands the change initially proposed on #8359 but without a new nginx location block, so it has less change surface. Co-authored-by: Jeff Wong <awole20@gmail.com> Co-authored-by: Jeff Wong <awole20@gmail.com>
This commit is contained in:

committed by
GitHub

parent
b0b23a969f
commit
9118bb2076
@ -512,8 +512,6 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def client_side_setup_data
|
||||
service_worker_url = Rails.env.development? ? 'service-worker.js' : Rails.application.assets_manifest.assets['service-worker.js']
|
||||
|
||||
setup_data = {
|
||||
cdn: Rails.configuration.action_controller.asset_host,
|
||||
base_url: Discourse.base_url,
|
||||
@ -521,7 +519,7 @@ module ApplicationHelper
|
||||
environment: Rails.env,
|
||||
letter_avatar_version: LetterAvatar.version,
|
||||
markdown_it_url: script_asset_path('markdown-it-bundle'),
|
||||
service_worker_url: service_worker_url,
|
||||
service_worker_url: 'service-worker.js',
|
||||
default_locale: SiteSetting.default_locale,
|
||||
asset_version: Discourse.assets_digest,
|
||||
disable_custom_css: loading_admin?,
|
||||
|
Reference in New Issue
Block a user