Browse Source

Define robots.txt as a static file

Baptiste Jonglez 10 years ago
parent
commit
535e7d1b47
2 changed files with 4 additions and 1 deletions
  1. 1 1
      peerfinder.py
  2. 3 0
      static/robots.txt

+ 1 - 1
peerfinder.py

@@ -163,7 +163,7 @@ def homepage():
 
 @app.route('/robots.txt')
 def robots():
-    return "User-agent: *\nDisallow: /target/\nDisallow: /result/"
+    return app.send_static_file("robots.txt")
 
 @app.route('/submit', methods=['POST'])
 def submit_job():

+ 3 - 0
static/robots.txt

@@ -0,0 +1,3 @@
+User-agent: *
+Disallow: /target/
+Disallow: /result/