Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yosuke-furukawa/feature-policy

Feature Policy HTTP Header middleware
https://github.com/yosuke-furukawa/feature-policy

Last synced: about 1 month ago
JSON representation

Feature Policy HTTP Header middleware

Awesome Lists containing this project

README

        

# Feature Policy

This module adds a `Feature-Policy` http header.

# install

```
$ npm i node-feature-policy
```

# usage

```
const express = require('express');
const featurePolicy = require('node-feature-policy');
const app = express();

app.use(featurePolicy({
"lazyload": "'none'",
"document-write": "'none'",
"sync-xhr": "'none'",
"legacy-image-formats": "'none'",
}));
app.use(express.static('public'));
app.listen(3000);
```