mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Prevent headers sent error
This commit is contained in:
parent
ace01da348
commit
cace0d1a71
@ -1,5 +1,10 @@
|
||||
const advertiseDoNotTrack = (_, res, next) => {
|
||||
res.setHeader('Tk', 'N')
|
||||
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
Block a user