the '?' favicon hack doesn't seem to be required

probably due to recent changes in `UploadsController`.
This commit is contained in:
Alexis Reigel 2018-04-09 16:49:41 +02:00 committed by Alexis Reigel
parent b4d84c07bc
commit 46328b1242
No known key found for this signature in database
GPG key ID: C728AF10972E97C0

View file

@ -2,7 +2,7 @@ module Gitlab
class Favicon class Favicon
class << self class << self
def main def main
return custom_favicon_url(appearance_favicon.favicon_main.url) if appearance_favicon.exists? return appearance_favicon.favicon_main.url if appearance_favicon.exists?
return ActionController::Base.helpers.image_path('favicon-yellow.png') if Gitlab::Utils.to_boolean(ENV['CANARY']) return ActionController::Base.helpers.image_path('favicon-yellow.png') if Gitlab::Utils.to_boolean(ENV['CANARY'])
return ActionController::Base.helpers.image_path('favicon-blue.png') if Rails.env.development? return ActionController::Base.helpers.image_path('favicon-blue.png') if Rails.env.development?
@ -35,13 +35,6 @@ module Gitlab
def appearance_favicon def appearance_favicon
appearance.favicon appearance.favicon
end end
# Without the '?' at the end of the favicon url the custom favicon (i.e.
# the favicons that are served through `UploadController`) are not shown
# in the browser.
def custom_favicon_url(url)
"#{url}?"
end
end end
end end
end end