Prevent headers sent error
This commit is contained in:
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