mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
FIX: use default favicon if a bad favicon is specified
This commit is contained in:
parent
c87fff670d
commit
00342faff9
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue