class Rack::BounceFavicon

Bounce those annoying favicon.ico requests

Public Class Methods

new(app) click to toggle source
  # File lib/rack/contrib/bounce_favicon.rb
6 def initialize(app)
7   @app = app
8 end

Public Instance Methods

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