mirror of https://github.com/Chocobozzz/PeerTube
Prevent headers sent error
parent
ace01da348
commit
cace0d1a71
|
@ -1,5 +1,10 @@
|
|||
const advertiseDoNotTrack = (_, res, next) => {
|
||||
import * as express from 'express'
|
||||
|
||||
const advertiseDoNotTrack = (_, res: express.Response, next: express.NextFunction) => {
|
||||
if (!res.headersSent) {
|
||||
res.setHeader('Tk', 'N')
|
||||
}
|
||||
|
||||
return next()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue