mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-10-13 18:22:13 +08:00
fix: mock.js request method match
This commit is contained in:
parent
effd1378b4
commit
6ae0b0a75c
@ -137,7 +137,7 @@ export default (api) => {
|
|||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
// 请求以 cgiMock.prefix 开头,匹配处理
|
// 请求以 cgiMock.prefix 开头,匹配处理
|
||||||
const matchRequet = requestList.find((item) => req.path.search(item.url) !== -1);
|
const matchRequet = requestList.find((item) => req.path.search(item.url) !== -1 && req.method === (item.method || 'GET').toUpperCase());
|
||||||
if (!matchRequet) {
|
if (!matchRequet) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user