Class: Imagery::FaviconFilter
- Inherits:
-
Object
- Object
- Imagery::FaviconFilter
- Defined in:
- lib/imagery/middleware/favicon_filter.rb
Constant Summary
- Empty =
[200, {'Content-Type' => 'text/plain'}, ['']].freeze
Instance Method Summary (collapse)
- - (Object) call(env)
-
- (FaviconFilter) initialize(app)
constructor
A new instance of FaviconFilter.
Constructor Details
- (FaviconFilter) initialize(app)
A new instance of FaviconFilter
5 6 7 |
# File 'lib/imagery/middleware/favicon_filter.rb', line 5 def initialize(app) @app = app end |
Instance Method Details
- (Object) call(env)
9 10 11 12 13 14 15 |
# File 'lib/imagery/middleware/favicon_filter.rb', line 9 def call(env) if env['REQUEST_URI'] == '/favicon.ico' return Empty else @app.call(env) end end |