append-header

append-header

append-header

Extends a response object with an appendHeader method.

var app = require('express')()
require('append-header')(app.response)
 
app.use(express.compress())
app.use(function (reqresnext) {
  res.appendHeader('Vary', 'Accept-Language')
  next()
})

The server response will now have a Vary header set to Accept-Encoding, Accept-Language.

var http = require('http')
require('append-header')(http.ServerResponse.prototype)
$ npm install append-header

MIT