Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fireblinkltd/prxi.dev
Localhost proxy server based on prxi
https://github.com/fireblinkltd/prxi.dev
Last synced: about 1 month ago
JSON representation
Localhost proxy server based on prxi
- Host: GitHub
- URL: https://github.com/fireblinkltd/prxi.dev
- Owner: FireBlinkLTD
- Created: 2023-08-09T10:52:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-15T17:09:47.000Z (over 1 year ago)
- Last Synced: 2024-10-30T02:32:58.954Z (about 2 months ago)
- Language: TypeScript
- Size: 61.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @prxi/dev
Local development proxy server. Mainly used to inject custom headers to both request and response.
## Usage
Install globally:
```bash
npm i -g @prxi/dev
```Create `.prxi.yml` inside you project like the following:
```yaml
# port to listen connections on
port: 4444
# upstream endpoint
upstream: http://localhost:8080
```Run `prxi`
## CLI Options
- `-c --config [path]` - optional path to the configuration file, default one `.prxi.yml`
- `-o --option [name]` - optional name for the options file## Custom Headers
Update `.prxi.yml` and add
```yaml
default:
# additional request headers
request:
Authorization: Bearer 1# addition response headers
response:
X-Custom-Header: value
```### Options
It is possible to define different options for the request/response headers that will be added to the default set, add the following to the `.prxi.yml`:
```yaml
options:
option-name:
# additional request headers
request:
Authorization: Bearer 2# addition response headers
response:
X-Custom-Header: value
```Note: in the example above both `Authorization` and `X-Custom-Header` values will override the ones used in the `default` section.
To apply the options run `prxi` cli with the `-o --option` parameter, e.g:
```bash
prxi -o option-name
```## Useful Links
- [prxi](https://www.npmjs.com/package/prxi) zero dependency reverse proxy Node.js library
- [fireblink/prxi-openid-connect](https://hub.docker.com/r/fireblink/prxi-openid-connect) an OpenID Connect reverse proxy server based on [prxi](https://www.npmjs.com/package/prxi)