mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-04-23 11:22:10 +00:00
fix: Add missing user-agent
Signed-off-by: Avior <f.bouillon@aptatio.com>
This commit is contained in:
parent
467f6e9e95
commit
2b23503864
@ -21,7 +21,7 @@ server.use((_, res, next) => {
|
||||
// Route logging / Error logging for debugging
|
||||
server.use((req, res, next) => {
|
||||
res.on('close', () => {
|
||||
console.log(`[${new Date().toISOString()}]: ${req.method.padStart(7, ' ')} ${res.statusCode} ${(req.baseUrl ?? '') + req.url}`)
|
||||
console.log(`[${new Date().toISOString()}] ${req.headers['user-agent']?.slice(0, 32).padEnd(32)} ${req.method.padEnd(7)} ${res.statusCode} ${(req.baseUrl ?? '') + req.url}`)
|
||||
})
|
||||
res.on('error', (err) => {
|
||||
console.error('Error:')
|
||||
|
Loading…
x
Reference in New Issue
Block a user