@dkx/http-middleware-proxy
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

DKX/Http/Middleware/Proxy

Proxy middleware for @dkx/http-server.

Installation

$ npm install --save @dkx/http-middleware-proxy

or with yarn

$ yarn add @dkx/http-middleware-proxy

Usage

const {Server} = require('@dkx/http-server');
const {proxyMiddleware} = require('@dkx/http-middleware-proxy');

const app = new Server;
const proxyOptions = {
    host: 'http://example.com',
    timeout: 5000,
    passHeaders: ['X-Custom-header'],
    passAllHeaders: true
};

app.use(proxyMiddleware(proxyOptions));

Only the host option is required.

Readme

Keywords

none

Package Sidebar

Install

npm i @dkx/http-middleware-proxy

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

9.31 kB

Total Files

12

Last publish

Collaborators

  • davidkcz