Class: Locomotive::Steam::Middlewares::Robots

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/locomotive/steam/middlewares/robots.rb

Instance Method Summary collapse

Methods included from Helpers

#html?, #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/robots.rb', line 10

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