FIX: Follow redirects when downloading favicons.

This commit is contained in:
Guo Xiang Tan 2016-02-25 11:50:34 +08:00
parent e8de80de98
commit 62011a252f

View File

@ -101,7 +101,7 @@ class StaticController < ApplicationController
data = DistributedMemoizer.memoize('favicon' + SiteSetting.favicon_url, 60*30) do
begin
file = FileHelper.download(SiteSetting.favicon_url, 50.kilobytes, "favicon.png")
file = FileHelper.download(SiteSetting.favicon_url, 50.kilobytes, "favicon.png", true)
data = file.read
file.unlink
data