Miss any of our Open RFC calls?Watch the recordings here! »

@dkx/http-middleware-proxy

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.

Keywords

none

Install

npm i @dkx/http-middleware-proxy

DownloadsWeekly Downloads

7

Version

0.1.1

License

MIT

Unpacked Size

9.31 kB

Total Files

12

Last publish

Collaborators

  • avatar