If login is required skip CDN

This commit is contained in:
Sam 2018-01-09 17:51:53 +11:00
parent 6b8320fea6
commit c9f42506b7
1 changed files with 1 additions and 1 deletions

View File

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