Skip CDN for admin locales since it is login required

This commit is contained in:
Vinoth Kannan 2018-01-10 01:24:03 +05:30
parent 672888f526
commit 61384c8026
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class ExtraLocalesController < ApplicationController
def self.url(bundle)
if Rails.env == "production"
"#{SiteSetting.login_required ? "" : GlobalSetting.cdn_url}#{Discourse.base_uri}/extra-locales/#{bundle}?v=#{bundle_js_hash(bundle)}"
"#{SiteSetting.login_required || bundle =~ /^(admin|wizard)$/ ? "" : GlobalSetting.cdn_url}#{Discourse.base_uri}/extra-locales/#{bundle}?v=#{bundle_js_hash(bundle)}"
else
"#{Discourse.base_uri}/extra-locales/#{bundle}"
end