deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@redhat.com
Subject [PATCH] Activate robots.txt for Deltacloud servers - DTACLOUD-440
Date Mon, 28 Jan 2013 16:18:03 GMT
From: marios <marios@redhat.com>

https://issues.apache.org/jira/browse/DTACLOUD-440

Signed-off-by: marios <marios@redhat.com>
---
 server/lib/deltacloud_rack.rb | 4 ++++
 server/public/robots.txt      | 7 ++-----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/server/lib/deltacloud_rack.rb b/server/lib/deltacloud_rack.rb
index 8ddcb41..1a1d5b3 100644
--- a/server/lib/deltacloud_rack.rb
+++ b/server/lib/deltacloud_rack.rb
@@ -68,6 +68,10 @@ module Deltacloud
 
     set :views, File.join(File.dirname(__FILE__), '..', 'views')
 
+    get '/robots.txt' do
+      File.read(File.join('public', 'robots.txt'))
+    end
+
     get '/' do
       respond_to do |format|
         format.xml { haml :'index', :layout => false }
diff --git a/server/public/robots.txt b/server/public/robots.txt
index 085187f..c6742d8 100644
--- a/server/public/robots.txt
+++ b/server/public/robots.txt
@@ -1,5 +1,2 @@
-# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt
file
-#
-# To ban all spiders from the entire site uncomment the next two lines:
-# User-Agent: *
-# Disallow: /
+User-Agent: *
+Disallow: /
-- 
1.7.11.7


Mime
View raw message