express-gpc

1.0.0 • Public • Published

express-gpc

A basic Express middleware to support easy detection of the GPC flag (https://globalprivacycontrol.org/).

let express = require('express')
  , detectGPC = require('express-gpc')
  , app = express()
;

app.use(detectGPC());

app.get('/', (req, res) => {
  if (req.globalPrivacyControl) {
    // don't sell this person's data
  }
  else {
    // ah, no privacy for you!
  }
})

/express-gpc/

    Package Sidebar

    Install

    npm i express-gpc

    Weekly Downloads

    59

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    2.83 kB

    Total Files

    5

    Last publish

    Collaborators

    • robin.berjon