# pro-xy-header-replace

> Plugin for pro-xy. It allows doing replaces in headers.

Latest version **0.1.2** (published 2016-11-21) · ISC license · 0 weekly downloads

## Install

```sh
npm install pro-xy-header-replace
pnpm add pro-xy-header-replace
yarn add pro-xy-header-replace
bun add pro-xy-header-replace
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2016-11-21 |
| First published | 2016-11-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | zboron.lukas@gmail.com |
| Maintainers | adros |

## Links

- npm: https://www.npmjs.com/package/pro-xy-header-replace
- Repository: https://github.com/adros/pro-xy-header-replace
- Homepage: https://github.com/adros/pro-xy-header-replace#readme
- Issues: https://github.com/adros/pro-xy-header-replace/issues
- npm.io page: https://npm.io/package/pro-xy-header-replace

## Recent versions

- 0.1.2 (latest) — 2016-11-21
- 0.1.1 — 2016-11-21
- 0.1.0 — 2016-11-21

## README

# pro-xy-header-replace

Plugin for pro-xy, that performs user defined replaces in request or response headers.

Sample configuration

```
{
    "port": 8000,
    "logLevel": "INFO",
    "plugins": [
        "pro-xy-header-replace"
    ],
	"pro-xy-cookie-replace" : {
		"disabled": true,
		"replaces": [
			{
				"urlPattern": ".*",
				"request" : false,
				"response" : true,
				"header" : "Content-Type",
				"pattern": "text/html",
				"replacement": "text/plain"
		    }
		]
	}
}
```

Configuration consists of list of config objects with following properties:

- *urlPattern* - regular expression that will be used to test if current request will be processed by plugin
- *request* - if true, replace headers in request
- *response* - if true, replace headers in response
- *header* - name of header to replace value in
- *pattern* - regular expression to find part of header value to replace
- *replacement* - replacement value

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