Skip to content

Commit 7638096

Browse files
author
jensj
committed
Block robots
1 parent 37690b1 commit 7638096

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ase/db/app.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ def sqliteall():
164164
table_id = int(request.args['x'])
165165
query, columns, sort, limit, opened = tables[table_id]
166166
data = tofile(query, 'db', limit)
167-
return data, 'selection.db'.format(id)
167+
return data, 'selection.db'
168168

169169

170170
@app.route('/sqlite/<int:id>')
@@ -173,7 +173,12 @@ def sqlite(id):
173173
data = tofile(id, 'db')
174174
return data, '{0}.db'.format(id)
175175

176-
176+
177+
@app.route('/robots.txt')
178+
def robots():
179+
return 'User-agent: *\nDisallow: /\n', 200
180+
181+
177182
if __name__ == '__main__':
178183
globals()['connection'] = ase.db.connect(sys.argv[1])
179184
globals()['open_ase_gui'] = False

0 commit comments

Comments
 (0)