{"_id":"feature-policy","_rev":"1755518","name":"feature-policy","description":"Middleware to set the Feature-Policy HTTP header","dist-tags":{"latest":"0.6.0"},"maintainers":[{"name":"evanhahn","email":"me@evanhahn.com"}],"time":{"modified":"2021-11-29T01:35:26.000Z","created":"2018-10-09T17:36:28.132Z","0.6.0":"2020-12-23T15:07:21.609Z","0.5.0":"2020-04-16T19:32:42.666Z","0.4.0":"2019-09-01T19:28:05.496Z","0.3.0":"2019-05-05T18:53:26.301Z","0.2.0":"2018-11-07T16:43:06.044Z","0.1.0":"2018-10-09T17:36:28.132Z"},"users":{},"author":{"name":"Evan Hahn","email":"me@evanhahn.com","url":"https://evanhahn.com"},"repository":{"type":"git","url":"git://github.com/helmetjs/feature-policy.git"},"versions":{"0.6.0":{"name":"feature-policy","author":{"name":"Evan Hahn","email":"me@evanhahn.com","url":"https://evanhahn.com"},"description":"Middleware to set the Feature-Policy HTTP header","version":"0.6.0","license":"MIT","keywords":["helmet","security","express","connect","feature-policy"],"homepage":"https://github.com/helmetjs/feature-policy","repository":{"type":"git","url":"git://github.com/helmetjs/feature-policy.git"},"bugs":{"url":"https://github.com/helmetjs/feature-policy/issues","email":"me@evanhahn.com"},"scripts":{"pretest":"npm run lint","prepublishOnly":"npm run build","lint":"npm run lint:eslint && npm run lint:prettier","lint:eslint":"eslint \"**/*.ts\"","lint:prettier":"prettier --check \"**/*.{md,js,json,ts}\"","format":"prettier --write \"**/*.{md,js,json,ts}\"","clean":"rm -rf dist","build":"npm run clean && tsc","test":"jest --config test/jest-config.json"},"engines":{"node":">=8.0.0"},"main":"./dist/index.js","typings":"./dist/index.d.ts","devDependencies":{"@types/connect":"^3.4.34","@types/dashify":"^1.0.0","@types/jest":"^26.0.19","@types/supertest":"^2.0.10","@typescript-eslint/eslint-plugin":"^4.11.0","@typescript-eslint/parser":"^4.11.0","connect":"^3.7.0","dashify":"^2.0.0","eslint":"^7.16.0","eslint-config-helmet":"^0.2.0","jest":"^26.6.3","prettier":"^2.2.1","supertest":"^6.0.1","ts-jest":"^26.4.4","typescript":"^4.1.3"},"gitHead":"e25f7c5ecbb82f412a858de3c1817fa5e67be6ea","_id":"feature-policy@0.6.0","_nodeVersion":"15.4.0","_npmVersion":"7.0.15","dist":{"shasum":"4d1ee7e8fa615e023d1cdb884a1777a99220febf","size":4200,"noattachment":false,"key":"/feature-policy/-/feature-policy-0.6.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/feature-policy/download/feature-policy-0.6.0.tgz"},"_npmUser":{"name":"evanhahn","email":"me@evanhahn.com"},"directories":{},"maintainers":[{"name":"evanhahn","email":"me@evanhahn.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/feature-policy_0.6.0_1608736041495_0.5838126691499372"},"_hasShrinkwrap":false,"publish_time":1608736041609,"_cnpm_publish_time":1608736041609},"0.5.0":{"name":"feature-policy","author":{"name":"Evan Hahn","email":"me@evanhahn.com","url":"https://evanhahn.com"},"description":"Middleware to set the Feature-Policy HTTP header","version":"0.5.0","license":"MIT","keywords":["helmet","security","express","connect","feature-policy"],"homepage":"https://helmetjs.github.io/docs/feature-policy/","repository":{"type":"git","url":"git://github.com/helmetjs/feature-policy.git"},"bugs":{"url":"https://github.com/helmetjs/feature-policy/issues","email":"me@evanhahn.com"},"scripts":{"pretest":"npm run lint","prepublishOnly":"npm run build","lint":"eslint --fix '**/*.ts'","test":"jest --config test/jest-config.json","clean":"rm -rf dist","build":"npm run clean && tsc"},"engines":{"node":">=8.0.0"},"main":"./dist/index.js","typings":"./dist/index.d.ts","dependencies":{},"devDependencies":{"@types/connect":"^3.4.33","@types/dashify":"^1.0.0","@types/jest":"^25.2.1","@types/supertest":"^2.0.8","@typescript-eslint/eslint-plugin":"^2.28.0","@typescript-eslint/parser":"^2.28.0","connect":"^3.7.0","dashify":"^2.0.0","eslint":"^6.8.0","eslint-config-helmet":"^0.2.0","jest":"^25.3.0","supertest":"^4.0.2","ts-jest":"^25.3.1","typescript":"^3.8.3"},"gitHead":"96334d14716f069866d9c99b230e6465bea6d6b5","_id":"feature-policy@0.5.0","_nodeVersion":"13.12.0","_npmVersion":"6.14.4","dist":{"shasum":"1c5ed3be9f91ef37d41ee2568e8ba26e6fa44fca","size":4041,"noattachment":false,"key":"/feature-policy/-/feature-policy-0.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/feature-policy/download/feature-policy-0.5.0.tgz"},"maintainers":[{"name":"evanhahn","email":"me@evanhahn.com"}],"_npmUser":{"name":"evanhahn","email":"me@evanhahn.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/feature-policy_0.5.0_1587065562521_0.9371498005427878"},"_hasShrinkwrap":false,"publish_time":1587065562666,"_cnpm_publish_time":1587065562666},"0.4.0":{"name":"feature-policy","author":{"name":"Evan Hahn","email":"me@evanhahn.com","url":"https://evanhahn.com"},"description":"Middleware to set the Feature-Policy HTTP header","version":"0.4.0","license":"MIT","keywords":["helmet","security","express","connect","feature-policy"],"homepage":"https://helmetjs.github.io/docs/feature-policy/","repository":{"type":"git","url":"git://github.com/helmetjs/feature-policy.git"},"bugs":{"url":"https://github.com/helmetjs/feature-policy/issues","email":"me@evanhahn.com"},"scripts":{"pretest":"npm run lint","prepublishOnly":"npm run build","lint":"eslint --fix '**/*.ts'","test":"jest --config test/jest-config.json","clean":"rm -rf dist","build":"npm run clean && tsc"},"engines":{"node":">=8.0.0"},"main":"./dist/index.js","typings":"./dist/index.d.ts","dependencies":{},"devDependencies":{"@types/connect":"^3.4.32","@types/dashify":"^1.0.0","@types/jest":"^24.0.18","@types/supertest":"^2.0.8","@typescript-eslint/eslint-plugin":"^2.0.0","@typescript-eslint/parser":"^2.0.0","connect":"^3.7.0","dashify":"^2.0.0","eslint":"^6.3.0","eslint-config-helmet":"^0.2.0","jest":"^24.9.0","supertest":"^4.0.2","ts-jest":"^24.0.2","typescript":"^3.6.2"},"gitHead":"ebefba424b3db0423d5c14e136530a8e85e476d0","_id":"feature-policy@0.4.0","_nodeVersion":"12.6.0","_npmVersion":"6.9.0","dist":{"shasum":"85a3a44f77f41b5535f30117ba8aa99b80a08b4c","size":3801,"noattachment":false,"key":"/feature-policy/-/feature-policy-0.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/feature-policy/download/feature-policy-0.4.0.tgz"},"maintainers":[{"name":"evanhahn","email":"me@evanhahn.com"}],"_npmUser":{"name":"evanhahn","email":"me@evanhahn.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/feature-policy_0.4.0_1567366085344_0.08181891610598035"},"_hasShrinkwrap":false,"publish_time":1567366085496,"_cnpm_publish_time":1567366085496},"0.3.0":{"name":"feature-policy","author":{"name":"Evan Hahn","email":"me@evanhahn.com","url":"https://evanhahn.com"},"description":"Middleware to set the Feature-Policy HTTP header","version":"0.3.0","license":"MIT","keywords":["helmet","security","express","connect","feature-policy"],"homepage":"https://helmetjs.github.io/docs/feature-policy/","repository":{"type":"git","url":"git://github.com/helmetjs/feature-policy.git"},"bugs":{"url":"https://github.com/helmetjs/feature-policy/issues","email":"me@evanhahn.com"},"scripts":{"pretest":"npm run lint","prepublishOnly":"npm run build","lint":"eslint --fix '**/*.ts'","test":"jest --config test/jest-config.json","clean":"rm -rf dist","build":"npm run clean && tsc"},"engines":{"node":">=4.0.0"},"main":"./dist/index.js","typings":"./dist/index.d.ts","dependencies":{},"devDependencies":{"@types/connect":"^3.4.32","@types/dashify":"^1.0.0","@types/jest":"^24.0.12","@types/supertest":"^2.0.7","@typescript-eslint/eslint-plugin":"^1.7.0","@typescript-eslint/parser":"^1.7.0","connect":"^3.6.6","dashify":"^2.0.0","eslint":"^5.16.0","eslint-config-helmet":"^0.2.0","jest":"^24.8.0","supertest":"^4.0.2","ts-jest":"^24.0.2","typescript":"^3.4.5"},"gitHead":"573389011afed6ada1bd1335c594480a5d6fce58","_id":"feature-policy@0.3.0","_nodeVersion":"11.14.0","_npmVersion":"6.9.0","dist":{"shasum":"7430e8e54a40da01156ca30aaec1a381ce536069","size":3551,"noattachment":false,"key":"/feature-policy/-/feature-policy-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/feature-policy/download/feature-policy-0.3.0.tgz"},"maintainers":[{"name":"evanhahn","email":"me@evanhahn.com"}],"_npmUser":{"name":"evanhahn","email":"me@evanhahn.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/feature-policy_0.3.0_1557082406127_0.6830813108004252"},"_hasShrinkwrap":false,"publish_time":1557082406301,"_cnpm_publish_time":1557082406301},"0.2.0":{"name":"feature-policy","author":{"name":"Evan Hahn","email":"me@evanhahn.com","url":"https://evanhahn.com"},"description":"Middleware to set the Feature-Policy HTTP header","version":"0.2.0","license":"MIT","keywords":["helmet","security","express","connect","feature-policy"],"repository":{"type":"git","url":"git://github.com/helmetjs/feature-policy.git"},"bugs":{"url":"https://github.com/helmetjs/feature-policy/issues"},"scripts":{"pretest":"standard --fix","test":"mocha"},"dependencies":{},"devDependencies":{"connect":"^3.6.6","dasherize":"^2.0.0","mocha":"^5.2.0","standard":"^12.0.1","supertest":"^3.3.0"},"standard":{"globals":["describe","beforeEach","it"]},"gitHead":"d007bb86b519e6efb7027cc9325d0d6ce0f8a099","homepage":"https://github.com/helmetjs/feature-policy#readme","_id":"feature-policy@0.2.0","_npmVersion":"6.4.1","_nodeVersion":"11.0.0","_npmUser":{"name":"evanhahn","email":"me@evanhahn.com"},"dist":{"shasum":"22096de49ab240176878ffe2bde2f6ff04d48c43","size":2591,"noattachment":false,"key":"/feature-policy/-/feature-policy-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/feature-policy/download/feature-policy-0.2.0.tgz"},"maintainers":[{"name":"evanhahn","email":"me@evanhahn.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/feature-policy_0.2.0_1541608985922_0.5227434771546264"},"_hasShrinkwrap":false,"publish_time":1541608986044,"_cnpm_publish_time":1541608986044},"0.1.0":{"name":"feature-policy","author":{"name":"Evan Hahn","email":"me@evanhahn.com","url":"https://evanhahn.com"},"description":"Middleware to set the Feature-Policy HTTP header","version":"0.1.0","license":"MIT","keywords":["helmet","security","express","connect","feature-policy"],"repository":{"type":"git","url":"git://github.com/helmetjs/feature-policy.git"},"bugs":{"url":"https://github.com/helmetjs/feature-policy/issues"},"scripts":{"pretest":"standard --fix","test":"mocha"},"dependencies":{},"devDependencies":{"connect":"^3.6.6","dasherize":"^2.0.0","mocha":"^5.2.0","standard":"^12.0.1","supertest":"^3.3.0"},"standard":{"globals":["describe","beforeEach","it"]},"gitHead":"32b24dec91c81cc94fc36e2e2723deea8cca5d2e","homepage":"https://github.com/helmetjs/feature-policy#readme","_id":"feature-policy@0.1.0","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"evanhahn","email":"me@evanhahn.com"},"dist":{"shasum":"782d4865b1f261aa6ff6d0bba0c4eaeb2fd92862","size":2548,"noattachment":false,"key":"/feature-policy/-/feature-policy-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/feature-policy/download/feature-policy-0.1.0.tgz"},"maintainers":[{"name":"evanhahn","email":"me@evanhahn.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/feature-policy_0.1.0_1539106586165_0.3502758693942263"},"_hasShrinkwrap":false,"publish_time":1539106588132,"_cnpm_publish_time":1539106588132}},"readme":"# Feature Policy\n\n[![Build Status](https://travis-ci.org/helmetjs/feature-policy.svg?branch=master)](https://travis-ci.org/helmetjs/feature-policy)\n\n**NOTE: The `Feature-Policy` header has been deprecated by browsers in favor of `Permissions-Policy`. This module will still be supported but no new features will be added.**\n\nThis is Express middleware to set the `Feature-Policy` header. You can read more about it [here](https://scotthelme.co.uk/a-new-security-header-feature-policy/) and [here](https://developers.google.com/web/updates/2018/06/feature-policy).\n\nTo use:\n\n```javascript\nconst featurePolicy = require(\"feature-policy\");\n\n// ...\n\napp.use(\n  featurePolicy({\n    features: {\n      fullscreen: [\"'self'\"],\n      vibrate: [\"'none'\"],\n      payment: [\"example.com\"],\n      syncXhr: [\"'none'\"],\n    },\n  })\n);\n```\n\nThe following features are currently supported:\n\n- `accelerometer`\n- `ambientLightSensor`\n- `autoplay`\n- `battery`\n- `camera`\n- `displayCapture`\n- `documentDomain`\n- `documentWrite`\n- `encryptedMedia`\n- `executionWhileNotRendered`\n- `executionWhileOutOfViewport`\n- `fontDisplayLateSwap`\n- `fullscreen`\n- `geolocation`\n- `gyroscope`\n- `layoutAnimations`\n- `legacyImageFormats`\n- `loadingFrameDefaultEager`\n- `magnetometer`\n- `microphone`\n- `midi`\n- `navigationOverride`\n- `notifications`\n- `oversizedImages`\n- `payment`\n- `pictureInPicture`\n- `publickeyCredentials`\n- `push`\n- `serial`\n- `speaker`\n- `syncScript`\n- `syncXhr`\n- `unoptimizedImages`\n- `unoptimizedLosslessImages`\n- `unoptimizedLossyImages`\n- `unsizedMedia`\n- `usb`\n- `verticalScroll`\n- `vibrate`\n- `vr`\n- `wakeLock`\n- `xr`\n- `xrSpatialTracking`\n","_attachments":{},"homepage":"https://github.com/helmetjs/feature-policy","bugs":{"url":"https://github.com/helmetjs/feature-policy/issues","email":"me@evanhahn.com"},"license":"MIT"}