From c9f42506b7bb92e16970c60828b2bacab1cd4e6f Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 9 Jan 2018 17:51:53 +1100 Subject: [PATCH] If login is required skip CDN --- app/controllers/extra_locales_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/extra_locales_controller.rb b/app/controllers/extra_locales_controller.rb index cbecf402885..6ee44ffa2fa 100644 --- a/app/controllers/extra_locales_controller.rb +++ b/app/controllers/extra_locales_controller.rb @@ -24,7 +24,7 @@ class ExtraLocalesController < ApplicationController def self.url(bundle) 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 "#{Discourse.base_uri}/extra-locales/#{bundle}" end