remove_date
v0.5.0
Published
remove Date header from http(s) response
Downloads
3
Readme
remove_date
Just a simple hack to remove Date header from HTTP(S) response. Similar to remove_connection
Installation
Install through NPM
npm install remove_date
or
git clone git://github.com/hex7c0/remove_date.git
API
inside nodejs project
var setDate = require('remove_date');
require('http').createServer(function(req, res) {
setDate(res); // remove Date header from response
res.writeHead(200, {
'Content-Type': 'text/plain'
});
res.end('Hello World\n');
}).listen(3000, '127.0.0.1');
as middleware
var setDate = require('remove_date').setDateMiddleware;
var app = require('express')();
app.use(setDate()).get('/', function(req, res) {
res.end('Hello World\n');
}).listen(3000, '127.0.0.1');
setDate(res [, setHeader])
options
res
- Object response to client (default "required")setHeader
- Boolean setHeader block (default "optional")
setDateMiddleware([setHeader])
options
setHeader
- Boolean setHeader block (default "optional")
Examples
Take a look at my examples