@midwayjs/http-proxy 3.12.10 → 3.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.httpProxy = void 0;
4
- exports.httpProxy = null;
4
+ exports.httpProxy = {
5
+ enable: true,
6
+ };
5
7
  //# sourceMappingURL=config.default.js.map
@@ -1,7 +1,8 @@
1
1
  import { MidwayApplicationManager } from '@midwayjs/core';
2
+ import { HttpProxyConfig } from './interface';
2
3
  export declare class HttpProxyConfiguration {
3
4
  applicationManager: MidwayApplicationManager;
4
- httpProxy: any;
5
+ httpProxy: Partial<HttpProxyConfig>;
5
6
  onReady(): Promise<void>;
6
7
  }
7
8
  //# sourceMappingURL=configuration.d.ts.map
@@ -15,7 +15,7 @@ const DefaultConfig = require("./config/config.default");
15
15
  const middleware_1 = require("./middleware");
16
16
  let HttpProxyConfiguration = class HttpProxyConfiguration {
17
17
  async onReady() {
18
- if (this.httpProxy) {
18
+ if (this.httpProxy.enable) {
19
19
  this.applicationManager
20
20
  .getApplications(['koa', 'faas', 'express', 'egg'])
21
21
  .forEach(app => {
@@ -8,6 +8,7 @@ export interface HttpProxyStrategy {
8
8
  };
9
9
  }
10
10
  export interface HttpProxyConfig extends HttpProxyStrategy {
11
+ enable?: boolean;
11
12
  default?: HttpProxyStrategy;
12
13
  strategy?: {
13
14
  [strategyName: string]: HttpProxyStrategy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midwayjs/http-proxy",
3
- "version": "3.12.10",
3
+ "version": "3.13.0",
4
4
  "description": "Midway Component for http proxy",
5
5
  "main": "dist/index.js",
6
6
  "typings": "index.d.ts",
@@ -26,16 +26,16 @@
26
26
  },
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
- "axios": "1.6.0"
29
+ "axios": "1.6.1"
30
30
  },
31
31
  "devDependencies": {
32
- "@midwayjs/core": "^3.12.3",
33
- "@midwayjs/express": "^3.12.10",
34
- "@midwayjs/faas": "^3.12.10",
35
- "@midwayjs/koa": "^3.12.10",
36
- "@midwayjs/mock": "^3.12.10",
37
- "@midwayjs/serverless-app": "^3.12.10",
38
- "@midwayjs/web": "^3.12.10"
32
+ "@midwayjs/core": "^3.13.0",
33
+ "@midwayjs/express": "^3.13.0",
34
+ "@midwayjs/faas": "^3.13.0",
35
+ "@midwayjs/koa": "^3.13.0",
36
+ "@midwayjs/mock": "^3.13.0",
37
+ "@midwayjs/serverless-app": "^3.13.0",
38
+ "@midwayjs/web": "^3.13.0"
39
39
  },
40
- "gitHead": "8d92c54424843d437fd5f77f6ff93f00c055117b"
40
+ "gitHead": "9f55734afa5b08dcf46bc89493ec8edaa8c6202b"
41
41
  }