Chocobozzz/PeerTube

View on GitHub
server/core/middlewares/dnt.ts

Summary

Maintainability
A
0 mins
Test Coverage
import * as express from 'express'

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

  return next()
}

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

export {
  advertiseDoNotTrack
}