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:
parent
5bceb37150
commit
e0b7cf6592
3 changed files with 0 additions and 48 deletions
|
@ -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' ] })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue