Open
Description
Version
3.1.1
Node and OS info
Node 10.13.0
Steps to reproduce
proxy: [
{
context: '/ajax',
target: 'https://localhost:3000',
},
{
context: function (pathname, req) {
const env = getPathnameEnv(pathname);
return env === 'online';
},
target: 'https://localhost:8081',
changeOrigin: true,
},
]
What is expected?
增强proxy, 对齐 webpack devServer的proxy
支持proxy数组与 http-proxy-middleware中所有格式的context, 例如
proxy: [
{
context: '/ajax',
target: 'https://localhost:3000',
},
{
context: function (pathname, req) {
const env = getPathnameEnv(pathname);
return env === 'online';
},
target: 'https://localhost:8081',
changeOrigin: true,
},
]
What is actually happening?
目前不支持数组类型的proxy, 也不支持自定义函数的context
Metadata
Metadata
Assignees
Labels
No labels