Sha256: 07a3d2ea65c3d5d29b3de24b89c7289566dabd1ee039c77ff5a67253d330561a

Contents?: true

Size: 352 Bytes

Versions: 15

Compression:

Stored size: 352 Bytes

Contents

module Locomotive::Steam
  module Middlewares

    class Robots < ThreadSafe

      include Concerns::Helpers

      def _call
        if env['PATH_INFO'] == '/robots.txt'
          site = env['steam.site']
          render_response(site[:robots_txt] || '', 200, 'text/plain')
        else
          self.next
        end
      end

    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
locomotivecms_steam-1.8.0.alpha2 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.8.0.alpha1 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.7.1 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.7.0 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.6.1 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.6.0 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.6.0.rc1 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.6.0.beta1 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.5.3 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.5.2 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.5.1 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.5.0 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.5.0.rc1 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.5.0.rc0 lib/locomotive/steam/middlewares/robots.rb
locomotivecms_steam-1.5.0.beta3 lib/locomotive/steam/middlewares/robots.rb