# unicity-forward-headers

> ## About Forwards the following headers: ```javascript [ 'x-request-uuid', 'x-request-release',

Latest version **1.0.4** (published 2019-07-29) · 0 weekly downloads

## Install

```sh
npm install unicity-forward-headers
pnpm add unicity-forward-headers
yarn add unicity-forward-headers
bun add unicity-forward-headers
```

## 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.4 |
| Published | 2019-07-29 |
| First published | 2019-05-01 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | brendenc00k, lukecfairchild, unicityit |

## Links

- npm: https://www.npmjs.com/package/unicity-forward-headers
- npm.io page: https://npm.io/package/unicity-forward-headers

## Recent versions

- 1.0.4 (latest) — 2019-07-29
- 1.0.3 — 2019-07-29
- 1.0.2 — 2019-05-01
- 1.0.1 — 2019-05-01
- 1.0.0 — 2019-05-01

## README

# Unicity-Forward-Headers

## About
Forwards the following headers:
```javascript
[
	'x-request-uuid',
	'x-request-release',

	// Envoy Headers
	'x-ot-span-context',
	'x-request-id',

	// Zipkin Headers
	'x-b3-traceid',
	'x-b3-spanid',
	'x-b3-parentspanid',
	'x-b3-sampled',

	// Jaeger Headers
	'x-b3-flags'
]
```

## Whats new?
#### 1.0.3
Breaking changes, unicity-forward-headers now expects the headers object directly and not request or response objects.
Also made it lowercase incoming headers to ensure dupliates are handled correctly.

## Example
```javascript
const ForwardHeaders = require('unicity-forward-headers');

response.headers = ForwardHeaders(request.headers, response.headers);
```
```javascript
const ForwardHeaders = require('unicity-forward-headers');

response.headers = ForwardHeaders(request.headers);
```

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