diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2018-08-03 02:02:01 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-08 09:22:15 +0200 |
commit | aad0ec24e886a93c5f85cbb8eb4c31ff5e973e1a (patch) | |
tree | 6a54425465578ddc1c6d5a3bc9c220d3653b5722 /server/middlewares/dnt.ts | |
parent | 9a12f169c15b638fe78cf6e85a1993550a25e404 (diff) | |
download | PeerTube-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.ts | 13 |
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 @@ | |||
1 | import * as ipaddr from 'ipaddr.js' | ||
2 | import { format } from 'util' | ||
3 | |||
4 | const advertiseDoNotTrack = (_, res, next) => { | ||
5 | res.setHeader('Tk', 'N') | ||
6 | return next() | ||
7 | } | ||
8 | |||
9 | // --------------------------------------------------------------------------- | ||
10 | |||
11 | export { | ||
12 | advertiseDoNotTrack | ||
13 | } | ||