Sha256: 0505a2c60dc42b562143bb92cc2fd827036ad4b0d1122da73692f45438b63834

Contents?: true

Size: 372 Bytes

Versions: 7

Compression:

Stored size: 372 Bytes

Contents

module Locomotive::Steam
  module Middlewares

    class Favicon < Struct.new(:app)

      include Helpers

      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

    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
locomotivecms_steam-1.0.0.pre.beta.3 lib/locomotive/steam/middlewares/favicon.rb
locomotivecms_steam-1.0.0.pre.beta.2 lib/locomotive/steam/middlewares/favicon.rb
locomotivecms_steam-1.0.0.pre.beta.1 lib/locomotive/steam/middlewares/favicon.rb
locomotivecms_steam-1.0.0.pre.alpha.3 lib/locomotive/steam/middlewares/favicon.rb
locomotivecms_steam-1.0.0.pre.alpha.2 lib/locomotive/steam/middlewares/favicon.rb
locomotivecms_steam-1.0.0.pre.alpha.1 lib/locomotive/steam/middlewares/favicon.rb
locomotivecms_steam-1.0.0.pre.alpha lib/locomotive/steam/middlewares/favicon.rb