mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 20:24:05 -06:00
FIX: use default favicon if a bad favicon is specified
This commit is contained in:
parent
c87fff670d
commit
00342faff9
@ -106,7 +106,9 @@ class StaticController < ApplicationController
|
||||
end
|
||||
|
||||
if data.bytesize == 0
|
||||
render text: UserAvatarsController::DOT, content_type: "image/gif"
|
||||
@@default_favicon ||= File.read(Rails.root + "public/images/default-favicon.png")
|
||||
response.headers["Content-Length"] = @@default_favicon.bytesize.to_s
|
||||
render text: @@default_favicon, content_type: "image/png"
|
||||
else
|
||||
expires_in 1.year, public: true
|
||||
response.headers["Expires"] = 1.year.from_now.httpdate
|
||||
|
Loading…
Reference in New Issue
Block a user