Class: Locomotive::Steam::Middlewares::Favicon
- Inherits:
-
Object
- Object
- Locomotive::Steam::Middlewares::Favicon
- Includes:
- Concerns::Helpers
- Defined in:
- lib/locomotive/steam/middlewares/favicon.rb
Constant Summary
Constants included from Concerns::Helpers
Concerns::Helpers::CACHE_HEADERS, Concerns::Helpers::HTML_CONTENT_TYPE, Concerns::Helpers::HTML_MIME_TYPES
Instance Method Summary collapse
Methods included from Concerns::Helpers
#html?, #inject_cookies, #json?, #log, #make_local_path, #modify_path, #mounted_on, #redirect_to, #render_response
Instance Method Details
#call(env) ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/locomotive/steam/middlewares/favicon.rb', line 10 def call(env) if env['PATH_INFO'] == '/favicon.ico' # Default and empty Favicon rendered [200, { 'Content-Type' => 'image/vnd.microsoft.icon' }, ['']] else app.call(env) end end |