JSPM

hapi-set-header

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

Set a Hapi response header for all requests

Package Exports

  • hapi-set-header

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 (hapi-set-header) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

hapi-set-header

Circle CI bitHound Overall Score

hapi-set-header allows for globally setting a response header using an onPreResponse extension. Compatible with Boom responses.

Usage

The following example sets the Server header to Test Server

const Hapi = require('hapi');
const setHeader = requre('hapi-set-header');
const server = new Hapi.Server({});
setHeader(server, 'Server', 'Test Server');