feat: add robots.txt to lamassu-server and lamassu-admin
fix: fail fast on lamassu-server default route access
This commit is contained in:
parent
a29f3fc13c
commit
37e235452b
2 changed files with 11 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue