@aptoma/hapi-static-headers

3.0.0 • Public • Published

Build Status

@aptoma/hapi-static-headers

Hapi Plugin for adding a defined set of headers to be appended to all responses.

Installation

This module is installed via npm:

$ npm install @aptoma/hapi-static-headers

Examples

	const server = new Hapi.Server();

	await server.register({
		plugin: require('@aptoma/hapi-static-headers'),
		options: {
			headers: {
				'X-API-Version': (request) => {
					return request.pre.apiVersion;
				},
				'X-Service': 'The Service'
			}
		}
	});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    31
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.0
    31
  • 2.0.0
    2
  • 1.1.1
    0
  • 1.1.0
    1
  • 1.0.0
    0

Package Sidebar

Install

npm i @aptoma/hapi-static-headers

Weekly Downloads

34

Version

3.0.0

License

MIT

Unpacked Size

4.76 kB

Total Files

7

Last publish

Collaborators

  • aptoma