JSPM

p3p

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 363
  • Score
    100M100P100Q103363F

middleware for including a P3P (Platform for Privacy Preferences Project) header in an express/connect application

Package Exports

  • p3p

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (p3p) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

p3p

A node.js package for providing a connect/express middleware that enables P3P with various options.

build status

Installation (via npm)

$ npm install p3p

Usage

Our recommended settings output: CP="NOI ADM DEV PSAi OUR OTRo STP IND COM NAV DEM"

var express = require('express')
  , p3p = require('p3p')
  , app = express();

app.get('/', p3p(p3p.recommended), function(req, res, next){
  res.send('Rendered with a P3P privacy policy header!');
});

app.listen(80, function(){
  console.log('P3P-enabled web server listening on port 80');
});

Advanced Usage (Custom P3P Settings)

This example would output: CP="NOI CUR PSAi"

var express = require('express')
  , p3p = require('p3p')
  , app = express();

var p3pConfig = {
  access: 'nonident',
  purpose: {
    current: true,
    'individual-analysis': 'opt-in'
  }
};

app.get('/', p3p(p3pConfig), function(req, res, next){
  res.send('Rendered with a *CUSTOM* P3P privacy policy header!');
});

app.listen(80, function(){
  console.log('*CUSTOM* P3P-enabled web server listening on port 80');
});

The Compact Specification

http://compactprivacypolicy.org/compact_specification.htm

License

MIT License

Author

Troy Goode (troygoode@gmail.com)