# hapi-set-header

> Set a Hapi response header for all requests

Latest version **1.0.2** (published 2016-02-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install hapi-set-header
pnpm add hapi-set-header
yarn add hapi-set-header
bun add hapi-set-header
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2016-02-22 |
| First published | 2016-01-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | David Wood |
| Maintainers | davidwood |
| Keywords | hapi, header |

## Links

- npm: https://www.npmjs.com/package/hapi-set-header
- Repository: https://github.com/davidwood/hapi-set-header
- Homepage: https://github.com/davidwood/hapi-set-header#readme
- Issues: https://github.com/davidwood/hapi-set-header/issues
- npm.io page: https://npm.io/package/hapi-set-header

## Recent versions

- 1.0.2 (latest) — 2016-02-22
- 1.0.1 — 2016-01-20
- 1.0.0 — 2016-01-02

## README

# hapi-set-header

[![Circle CI](https://circleci.com/gh/davidwood/hapi-set-header/tree/master.svg?style=svg)](https://circleci.com/gh/davidwood/hapi-set-header/tree/master)
[![bitHound Overall Score](https://www.bithound.io/github/davidwood/hapi-set-header/badges/score.svg)](https://www.bithound.io/github/davidwood/hapi-set-header)

`hapi-set-header` allows for globally setting a response header using an `onPreResponse` extension. Compatible with [Boom](https://www.npmjs.com/package/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');
```

---
_Source: https://npm.io/package/hapi-set-header · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
