correct headers and add better caching

This commit is contained in:
Sam
2016-12-05 15:10:54 +11:00
parent 55b35a05ed
commit 8a98d617df
2 changed files with 2 additions and 1 deletions

View File

@@ -49,7 +49,7 @@ module ApplicationHelper
if GlobalSetting.cdn_url &&
GlobalSetting.cdn_url.start_with?("https") &&
ENV["COMPRESS_BROTLI"] == "1" &&
request.env["ACCEPT_ENCODING"] =~ /br/
request.env["HTTP_ACCEPT_ENCODING"] =~ /br/
tags = javascript_include_tag(*args)
tags.gsub!("#{GlobalSetting.cdn_url}/assets/", "#{GlobalSetting.cdn_url}/brotli_asset/")
tags.html_safe