1.1.0 • Published 1 year ago
request-outbox v1.1.0
Request Outbox
Capture requests and forward on manual release.
Configure the origin to send requests to the outbox instead of the target. Use the query parameter targetUrl to specify the originally target. Inspect requests in the user interface of the outbox. Release the request to the target or discard the request.
Customize the behavior (e.g. requests, responses) by using the API.
Installation
via npm
npm install -g request-outboxThis will install request-outbox as a command in your PATH.
Discard the -g flag if you'd like to use it as project dependency.
via docker
docker run -d --rm --name request-box -p 3000:3000 -e CALLBACK=http://localhost:3000 devnsi/request-outbox:latest
docker logs request-box
start http://localhost:3000See Dockerhub for available tags.
via source
git clone https://github.com/devnsi/request-outbox.git
cd request-outbox
npm install
npm startConfiguration
The application can be configured by environment variables.
Programmatic API
Add request-outbox as a module within your project's directory:
npm install request-outboxThen within your project files you can do something like:
import { RequestOutbox } from "request-outbox";
const requestOutbox = new RequestOutbox(false); // to disable automatic start up.
requestOutbox.forwardHeaders = ["authorization"]; // or by environment variables.
requestOutbox.start();
...
requestOutbox.stop();