From b713688ce274fbbbe1ba4c787fe4014ad3fac94e Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 5 Jan 2015 12:50:42 +1100 Subject: [PATCH] FIX: deliver discourse stylesheets over cdn --- lib/sass/discourse_stylesheets.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/sass/discourse_stylesheets.rb b/lib/sass/discourse_stylesheets.rb index ca0c5a9d63b..831815a8742 100644 --- a/lib/sass/discourse_stylesheets.rb +++ b/lib/sass/discourse_stylesheets.rb @@ -23,7 +23,7 @@ class DiscourseStylesheets builder = self.new(target) builder.compile unless File.exists?(builder.stylesheet_fullpath) builder.ensure_digestless_file - tag = %[] + tag = %[] cache[target] = tag @@ -110,9 +110,14 @@ class DiscourseStylesheets "#{cache_fullpath}/#{stylesheet_filename_no_digest}" end + def stylesheet_cdnpath + "#{GlobalSetting.cdn_url}#{stylesheet_relpath}?__ws#{Discourse.current_hostname}" + end + def stylesheet_relpath "/#{CACHE_PATH}/#{stylesheet_filename}" end + def stylesheet_relpath_no_digest "/#{CACHE_PATH}/#{stylesheet_filename_no_digest}" end