Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ette-proxy

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ette-proxy

[![Build Status](https://travis-ci.org/boycgit/ette-proxy.svg?branch=master)](https://travis-ci.org/boycgit/ette-proxy) [![Coverage Status](https://coveralls.io/repos/github/boycgit/ette-proxy/badge.svg?branch=master)](https://coveralls.io/github/boycgit/

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ette-proxy

Build Status Coverage StatusMIT Licence npm version

Proxy middleware for ette. inspired by http-proxy-middleware

  • written in Typescript
  • used with koa style
  • fully tested

Installation

Node.js / Browserify

npm install ette-proxy --save
var proxy = require('ette-proxy');

Global object

Include the pre-built script.

<script src="./dist/index.umd.min.js"></script>

Build & test

npm run build
npm test

Usage

param

notice

as the mechanism of middleware, you should always put proxy middleware before your router middleware:

right way:

   // 需要先挂载代理中间件,否则就错过了
    app.use(proxy(proxyConfig));

    // 然后再挂载路由
    app.use(router.routes());

incorrect way:(will not proxy the router.routes())

    // 先挂载挂载路由
    app.use(router.routes());

    // 后续挂载的代理功能对上述路由就不适用了
    app.use(proxy(proxyConfig));

document

npm run doc

then open the generated out/index.html file in your browser.

License

MIT.

FAQs

Package last updated on 16 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc