express-header
v1.1.1
Published
Fast, unopinionated, minimalist header middleware for the express framework
Downloads
1
Maintainers
Readme
express-header
Fast, unopinionated, minimalist header middleware for the express framework.
const express = require('express')
const expressHeader = require('express-header')
const PORT = 3000
const app = express()
app.use(expressHeader([
{key: 'X-Alpha', value: 'Alpha'},
{key: 'X-Beta', value: 'Beta'},
{key: 'x-gamma', value: 'Gamma'},
{key: 'x-gamma', value: ''}
]))
app.get('/', function (req, res) {
res.send('Hello World');
})
app.listen(PORT)
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js. Node.js 0.10 or higher is required.
Installation is done using the
npm install
command:
$ npm install express-header
Features
- Express framework support in middleware philosophy
- HTTP headers manipulation (add, remove, etc)
- Headers content modifications
- Focus on high performance
- Super-high test coverage
Docs & Community
- Website and Documentation - [website repo]
- Express Website and Documentation - [website repo]
- #express on freenode IRC
- GitHub Organization for Official Middleware & Modules
- Visit the Wiki
- Google Group for discussion
- Gitter for support and discussion
PROTIP Be sure to read Migrating from 3.x to 4.x as well as New features in 4.x.
Security Issues
If you discover a security vulnerability in Express, please see Security Policies and Procedures.
Philosophy
The Express philosophy is to provide small, robust tooling for HTTP servers, making it a great solution for single page applications, web sites, hybrids, or public HTTP APIs.
Express does not force you to use any specific header middleware. With support for many user cases, you can quickly craft your perfect framework with the Express-Header middleware.
Tests
To run the test suite, first install the dependencies, then run npm test
:
$ npm install
$ npm test
People
The author of Express-Header is foprofile
The original author of Express is TJ Holowaychuk
The lead maintainer when this header middleware born was Douglas Christopher Wilson