Pārlūkot izejas kodu

[enh] robots.txt added

asciimoo 11 gadus atpakaļ
vecāks
revīzija
822bf2f36d
1 mainītis faili ar 8 papildinājumiem un 0 dzēšanām
  1. 8
    0
      searx/webapp.py

+ 8
- 0
searx/webapp.py Parādīt failu

148
     stats = get_engines_stats()
148
     stats = get_engines_stats()
149
     return render('stats.html', stats=stats)
149
     return render('stats.html', stats=stats)
150
 
150
 
151
+@app.route('/robots.txt', methods=['GET'])
152
+def robots():
153
+    return Response("""User-agent: *
154
+Allow: /
155
+Allow: /about
156
+Disallow: /stats
157
+""", mimetype='text/plain')
158
+
151
 @app.route('/opensearch.xml', methods=['GET'])
159
 @app.route('/opensearch.xml', methods=['GET'])
152
 def opensearch():
160
 def opensearch():
153
     global opensearch_xml
161
     global opensearch_xml