Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
huangapple committed Dec 8, 2022
1 parent 91bdad3 commit 67b536c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { All, Configuration, Controller, Inject } from '@midwayjs/core';
import * as express from '@midwayjs/express';
import * as proxy from '../../../../src';
import * as https from "https";

@Configuration({
imports: [
Expand Down Expand Up @@ -38,11 +39,15 @@ import * as proxy from '../../../../src';
extReqOptions: {
//表示不重定义
maxRedirects: 0,
httpsAgent: new https.Agent({ rejectUnauthorized: false })
}
},
f: {
match: /.*?can302.*$/,
target: 'https://www.302.com/'
target: 'https://www.302.com/',
extReqOptions: {
httpsAgent: new https.Agent({ rejectUnauthorized: false })
}
}
}
},
Expand Down
7 changes: 6 additions & 1 deletion packages/http-proxy/test/fixtures/faas/src/configuration.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Configuration, Provide, ServerlessTrigger, ServerlessTriggerType } from '@midwayjs/core';
import * as faas from '@midwayjs/faas';
import * as proxy from '../../../../src';
import https from "https";

@Configuration({
imports: [
Expand Down Expand Up @@ -37,11 +38,15 @@ import * as proxy from '../../../../src';
extReqOptions: {
//表示不重定义
maxRedirects: 0,
httpsAgent: new https.Agent({ rejectUnauthorized: false })
}
},
f: {
match: /.*?can302.*$/,
target: 'https://www.302.com/'
target: 'https://www.302.com/',
extReqOptions: {
httpsAgent: new https.Agent({ rejectUnauthorized: false })
}
}
}
}
Expand Down
7 changes: 6 additions & 1 deletion packages/http-proxy/test/fixtures/koa/src/configuration.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Configuration } from '@midwayjs/core';
import * as koa from '@midwayjs/koa';
import * as proxy from '../../../../src';
import https from "https";

@Configuration({
imports: [
Expand Down Expand Up @@ -38,11 +39,15 @@ import * as proxy from '../../../../src';
extReqOptions: {
//表示不重定义
maxRedirects: 0,
httpsAgent: new https.Agent({ rejectUnauthorized: false })
}
},
f: {
match: /.*?can302.*$/,
target: 'https://www.302.com/'
target: 'https://www.302.com/',
extReqOptions: {
httpsAgent: new https.Agent({ rejectUnauthorized: false })
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import https from "https";

export const keys = 'test';
export const httpProxy = {
strategy: {
Expand Down Expand Up @@ -26,11 +28,15 @@ export const httpProxy = {
extReqOptions: {
//表示不重定义
maxRedirects: 0,
httpsAgent: new https.Agent({ rejectUnauthorized: false })
}
},
f: {
match: /.*?can302.*$/,
target: 'https://www.302.com/'
target: 'https://www.302.com/',
extReqOptions: {
httpsAgent: new https.Agent({ rejectUnauthorized: false })
}
}
},
};

0 comments on commit 67b536c

Please sign in to comment.