FIX: internal oneboxing wasn't working when login was required

This commit is contained in:
Régis Hanol 2017-07-17 17:33:10 +02:00
parent 653ef56dc7
commit 9e03fae26c
1 changed files with 1 additions and 2 deletions

View File

@ -18,7 +18,7 @@ module Oneboxer
end
def self.ignore_redirects
@ignore_redirects ||= ['http://store.steampowered.com']
@ignore_redirects ||= ['http://store.steampowered.com', Discourse.base_url]
end
def self.preview(url, options=nil)
@ -146,7 +146,6 @@ module Oneboxer
end
def self.onebox_raw(url)
Rails.cache.fetch(onebox_cache_key(url), expires_in: 1.day) do
fd = FinalDestination.new(url, ignore_redirects: ignore_redirects)
uri = fd.resolve