3 [](https://www.npmjs.org/package/vary)
4 [](http://nodejs.org/download/)
5 [](https://travis-ci.org/jshttp/vary)
6 [](https://coveralls.io/r/jshttp/vary)
7 [](https://www.gittip.com/dougwilson/)
9 Manipulate the HTTP Vary header
20 var vary = require('vary')
25 Adds the given header `field` to the `Vary` response header of `res`.
26 This can be a string of a single field, a string of a valid `Vary`
27 header, or an array of multiple fields.
29 This will append the header if not already listed, otherwise leaves
30 it listed in the current location.
33 // Append "Origin" to the Vary header of the response
37 ### vary.append(header, field)
39 Adds the given header `field` to the `Vary` response header string `header`.
40 This can be a string of a single field, a string of a valid `Vary` header,
41 or an array of multiple fields.
43 This will append the header if not already listed, otherwise leaves
44 it listed in the current location. The new header string is returned.
47 // Get header string appending "Origin" to "Accept, User-Agent"
48 vary.append('Accept, User-Agent', 'Origin')