mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-04-23 19:32:11 +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
|
// Route logging / Error logging for debugging
|
||||||
server.use((req, res, next) => {
|
server.use((req, res, next) => {
|
||||||
res.on('close', () => {
|
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) => {
|
res.on('error', (err) => {
|
||||||
console.error('Error:')
|
console.error('Error:')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user