Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5E924ED01 for ; Mon, 28 Jan 2013 16:18:33 +0000 (UTC) Received: (qmail 28858 invoked by uid 500); 28 Jan 2013 16:18:33 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 28841 invoked by uid 500); 28 Jan 2013 16:18:33 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 28831 invoked by uid 99); 28 Jan 2013 16:18:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jan 2013 16:18:33 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of marios@redhat.com designates 209.132.183.28 as permitted sender) Received: from [209.132.183.28] (HELO mx1.redhat.com) (209.132.183.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Jan 2013 16:18:27 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0SGI6Os008459 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 28 Jan 2013 11:18:06 -0500 Received: from name.redhat.com (ovpn-112-18.ams2.redhat.com [10.36.112.18]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r0SGI48a008343 for ; Mon, 28 Jan 2013 11:18:05 -0500 From: marios@redhat.com To: dev@deltacloud.apache.org Subject: [PATCH] Activate robots.txt for Deltacloud servers - DTACLOUD-440 Date: Mon, 28 Jan 2013 18:18:03 +0200 Message-Id: <1359389883-16159-1-git-send-email-marios@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Virus-Checked: Checked by ClamAV on apache.org From: marios https://issues.apache.org/jira/browse/DTACLOUD-440 Signed-off-by: marios --- 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