aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/dnt.ts
blob: a128aadf7879b8640bfde6b410417edcf28195e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import * as express from 'express'

const advertiseDoNotTrack = (_, res: express.Response, next: express.NextFunction) => {
  if (!res.headersSent) {
    res.setHeader('Tk', 'N')
  }

  return next()
}

// ---------------------------------------------------------------------------

export {
  advertiseDoNotTrack
}