aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/dnt.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2018-08-03 02:02:01 +0200
committerChocobozzz <me@florianbigard.com>2018-08-08 09:22:15 +0200
commitaad0ec24e886a93c5f85cbb8eb4c31ff5e973e1a (patch)
tree6a54425465578ddc1c6d5a3bc9c220d3653b5722 /server/middlewares/dnt.ts
parent9a12f169c15b638fe78cf6e85a1993550a25e404 (diff)
downloadPeerTube-aad0ec24e886a93c5f85cbb8eb4c31ff5e973e1a.tar.gz
PeerTube-aad0ec24e886a93c5f85cbb8eb4c31ff5e973e1a.tar.zst
PeerTube-aad0ec24e886a93c5f85cbb8eb4c31ff5e973e1a.zip
advertising PeerTube's rather simple DNT policy
Diffstat (limited to 'server/middlewares/dnt.ts')
-rw-r--r--server/middlewares/dnt.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/server/middlewares/dnt.ts b/server/middlewares/dnt.ts
new file mode 100644
index 000000000..cabad39c6
--- /dev/null
+++ b/server/middlewares/dnt.ts
@@ -0,0 +1,13 @@
1import * as ipaddr from 'ipaddr.js'
2import { format } from 'util'
3
4const advertiseDoNotTrack = (_, res, next) => {
5 res.setHeader('Tk', 'N')
6 return next()
7}
8
9// ---------------------------------------------------------------------------
10
11export {
12 advertiseDoNotTrack
13 }