Browse Source

Fixed robots.txt so that preview is not crawlable

development
Godwin 8 years ago
committed by GitHub
parent
commit
b89cad4ec4
  1. 3
      app/controllers/application_controller.rb

3
app/controllers/application_controller.rb

@ -90,8 +90,7 @@ class ApplicationController < LinguaFrancaApplicationController
end end
def robots def robots
robot = is_production? && !is_test_server? ? 'live' : 'dev' render :text => File.read("config/robots-#{Rails.env.production? ? 'live' : 'dev'}.txt"), :content_type => 'text/plain'
render :text => File.read("config/robots-#{robot}.txt"), :content_type => 'text/plain'
end end
def humans def humans

Loading…
Cancel
Save