class Rack::BounceFavicon

Bounce those annoying favicon.ico requests

Public Instance Methods

call(env) click to toggle source
# File lib/rack/contrib/bounce_favicon.rb, line 8
def call(env)
  if env["PATH_INFO"] == "/favicon.ico"
    [404, {"Content-Type" => "text/html", "Content-Length" => "0"}, []]
  else
    @app.call(env)
  end
end

Public Class Methods

new(app) click to toggle source
# File lib/rack/contrib/bounce_favicon.rb, line 4
def initialize(app)
  @app = app
end