From 84da34169db32c842f495bb28265a0216a67e4f6 Mon Sep 17 00:00:00 2001 From: timvisee Date: Wed, 19 May 2021 16:00:58 +0200 Subject: [PATCH] Create static robots.txt file, remove dynamic route Fixes https://gitlab.com/timvisee/send/-/issues/17 --- app/routes.js | 1 - public/robots.txt | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 public/robots.txt diff --git a/app/routes.js b/app/routes.js index 440f9299..6a259710 100644 --- a/app/routes.js +++ b/app/routes.js @@ -9,7 +9,6 @@ module.exports = function(app = choo({ hash: true })) { app.route('/unsupported/:reason', body(require('./ui/unsupported'))); app.route('/error', body(require('./ui/error'))); app.route('/blank', body(require('./ui/blank'))); - app.route('/robots.txt', function() {return 'User-agent: * Disallow: /'}); app.route('/oauth', function(state, emit) { emit('authenticate', state.query.code, state.query.state); }); diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 00000000..1f53798b --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /