diff --git a/lib/routes.js b/lib/routes.js index 6248fc8e..7cc6bb5b 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -56,6 +56,15 @@ app.use(nocache()) app.use(express.json({ limit: '2mb' })) app.use(morgan(':method :url :status :response-time ms -- :req[content-length]/:res[content-length] b', { stream: logger.stream })) +app.use('/robots.txt', (req, res) => { + res.type('text/plain') + res.send("User-agent: *\nDisallow: /") +}) + +app.get('/', (req, res) => { + res.status(404).json({ error: 'No such route' }) +}) + // app /pair and /ca routes app.use('/', pairingRoutes) diff --git a/new-lamassu-admin/public/robots.txt b/new-lamassu-admin/public/robots.txt new file mode 100644 index 00000000..77470cb3 --- /dev/null +++ b/new-lamassu-admin/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file