Merge pull request #1747 from RafaelTaranto/backport/fail-fast-on-default-route
LAM-254 backport: fail fast on default route
This commit is contained in:
commit
f7216d088d
2 changed files with 11 additions and 0 deletions
|
|
@ -61,6 +61,15 @@ morgan.token('bytesRead', (_req, res) => res.bytesRead)
|
|||
morgan.token('bytesWritten', (_req, res) => res.bytesWritten)
|
||||
app.use(morgan(':method :url :status :response-time ms -- :bytesRead/:bytesWritten B', { stream: logger.stream }))
|
||||
|
||||
app.use('/robots.txt', (req, res) => {
|
||||
res.type('text/plain')
|
||||
res.send("User-agent: *\nDisallow: /")
|
||||
})
|
||||
|
||||
app.get('/', (req, res) => {
|
||||
res.sendStatus(404)
|
||||
})
|
||||
|
||||
// app /pair and /ca routes
|
||||
app.use('/', pairingRoutes)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue