Rename SiteSetting#use_https to force_https.

This commit is contained in:
Guo Xiang Tan
2016-06-27 17:26:43 +08:00
parent 83b08b87d5
commit 20359788dc
16 changed files with 75 additions and 18 deletions

View File

@ -45,7 +45,7 @@ module Onebox
case route[:controller]
when 'uploads'
url.gsub!("http:", "https:") if SiteSetting.use_https
url.gsub!("http:", "https:") if SiteSetting.force_https
if File.extname(uri.path) =~ /^.(mov|mp4|webm|ogv)$/
return "<video width='100%' height='100%' controls><source src='#{url}'><a href='#{url}'>#{url}</a></video>"
elsif File.extname(uri.path) =~ /^.(mp3|ogg|wav)$/