1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Remove deprecated non standard DNT support

This commit is contained in:
Chocobozzz 2025-06-17 08:14:15 +02:00
parent 5bceb37150
commit e0b7cf6592
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 0 additions and 48 deletions

View file

@ -64,7 +64,6 @@ import morgan, { token } from 'morgan'
import cors from 'cors'
import cookieParser from 'cookie-parser'
import { frameguard } from 'helmet'
import { parse } from 'useragent'
import anonymize from 'ip-anonymize'
import { program as cli } from 'commander'
@ -178,14 +177,6 @@ if (CONFIG.LOG.LOG_HTTP_REQUESTS) {
return req.ip
})
token('user-agent', (req: express.Request) => {
if (req.get('DNT') === '1') {
return parse(req.get('user-agent')).family
}
return req.get('user-agent')
})
app.use(morgan('combined', {
stream: {
write: (str: string) => logger.info(str.trim(), { tags: [ 'http' ] })