JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 41753548
  • Score
    100M100P100Q298623F
  • License MIT

Update the Vary header of a response

Package Exports

  • vary

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vary) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vary

NPM version Build Status Coverage Status

Update the Vary header of a response

Install

$ npm install vary

API

var vary = require('vary')

vary(res, field)

Adds the given header field to the Vary response header of res. This can be a string of a single field or an array of multiple fields.

This will append the header if not already listed, otherwise leaves it listed in the current location.

vary(res, 'Origin')
vary(res, 'User-Agent')
vary(res, ['Accept', 'Accept-Language', 'Accept-Encoding'])

Testing

$ npm test

License

MIT