Giter Site home page Giter Site logo

helmet-1's Introduction

Rill
@rill/helmet
API stability Standard NPM version Downloads Gitter Chat

A wrapper for helmet that works with Rill.

Helmet helps you secure your app by setting various HTTP headers.

Installation

npm install @rill/helmet

Example

You can use the default settings.

const app = require('rill')()
const helmet = require('@rill/helmet')

app.use(helmet())

Or use individual middleware.

app.use(helmet.noCache())
app.use(helmet.frameguard())

How it works

Helmet is a collection of 11 smaller middleware functions that set HTTP headers. Running app.use(helmet()) will not include all of these middleware functions by default.

Module Default?
contentSecurityPolicy for setting Content Security Policy
dnsPrefetchControl controls browser DNS prefetching
frameguard to prevent clickjacking
hidePoweredBy to remove the X-Powered-By header
hpkp for HTTP Public Key Pinning
hsts for HTTP Strict Transport Security
ieNoOpen sets X-Download-Options for IE8+
noCache to disable client-side caching
noSniff to keep clients from sniffing the MIME type
referrerPolicy to hide the Referer header
xssFilter adds some small XSS protections

For a more in depth guide on how to use @rill/helmet check out the official guide for helmet here.

Contributions

  • Use npm test to run tests.

Please feel free to create a PR!

helmet-1's People

Contributors

dylanpiercey avatar

Watchers

Evan Hahn avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.