Skip to content

Commit

Permalink
docs: update http-proxy.md (#3605)
Browse files Browse the repository at this point in the history
  • Loading branch information
liuhao16 authored Jan 29, 2024
1 parent 1af4006 commit 55cc29e
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions site/docs/extensions/http-proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,24 +100,26 @@ export default {

// 代理配置类型
export default {
default: {
// 一些每个策略复用的值,会和底下的策略进行合并
},
strategy: {
gw: {
// https://gw.alicdn.com/tfs/TB1.1EzoBBh1e4jSZFhXXcC9VXa-48-48.png
match: /\/tfs\//,
host: 'https://gw.alicdn.com',
},
g: {
// https://g.alicdn.com/mtb/lib-mtop/2.6.1/mtop.js
match: /\/bdimg\/(.*)$/,
target: 'https://sm.bdimg.com/$1',
httpProxy: {
default: {
// 一些每个策略复用的值,会和底下的策略进行合并
},
httpBin: {
// https://httpbin.org/
match: /\/httpbin\/(.*)$/,
target: 'https://httpbin.org/$1',
strategy: {
gw: {
// https://gw.alicdn.com/tfs/TB1.1EzoBBh1e4jSZFhXXcC9VXa-48-48.png
match: /\/tfs\//,
host: 'https://gw.alicdn.com',
},
g: {
// https://g.alicdn.com/mtb/lib-mtop/2.6.1/mtop.js
match: /\/bdimg\/(.*)$/,
target: 'https://sm.bdimg.com/$1',
},
httpBin: {
// https://httpbin.org/
match: /\/httpbin\/(.*)$/,
target: 'https://httpbin.org/$1',
},
},
},
};
Expand Down

0 comments on commit 55cc29e

Please sign in to comment.