Class: Locomotive::Steam::Server::Favicon

Inherits:
Middleware
  • Object
show all
Defined in:
lib/locomotive/steam/server/favicon.rb

Instance Attribute Summary

Attributes inherited from Middleware

#app, #content_entry, #liquid_assigns, #mounting_point, #page, #path, #request

Instance Method Summary collapse

Methods inherited from Middleware

#initialize

Constructor Details

This class inherits a constructor from Locomotive::Steam::Server::Middleware

Instance Method Details

#call(env) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/locomotive/steam/server/favicon.rb', line 6

def call(env)
  
  if env['PATH_INFO'] == '/favicon.ico'
    [200, { 'Content-Type' => 'image/vnd.microsoft.icon' }, ['']]
  else
    app.call(env)
  end
end