You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@midwayjs/http-proxy

Package Overview
Dependencies
Maintainers
7
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@midwayjs/http-proxy

Midway Component for http proxy

3.20.5
latest
npmnpm
Version published
Maintainers
7
Created
Source

HTTP 代理组件

HTTP 代理组件

适用于 @midwayjs/faas@midwayjs/web@midwayjs/koa@midwayjs/express 多种框架的 HTTP 代理组件,支持GET、POST等多种请求方法。

Usage

  • 安装依赖
$ npm i @midwayjs/http-proxy --save
  • 在 configuration 中引入组件,
import * as proxy from '@midwayjs/http-proxy';
@Configuration({
  imports: [
    // ...other components
    proxy
  ],
})
export class AutoConfiguration {}

配置

export const httpProxy = {
  host: 'http://127.0.0.1',
  match: /\/assets\/(.*)/,
  target: 'http://127.0.0.1/$1',
}

Keywords

midway

FAQs

Package last updated on 27 Apr 2025

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