fix: Rate limit feature is incompatible with Node 14 (#8578)

This commit is contained in:
Daniel
2023-05-25 21:13:39 +10:00
committed by GitHub
parent b0b99e7451
commit f911f2cd3a

View File

@@ -512,7 +512,7 @@ export const addRateLimit = (route, config, cloud) => {
},
});
}
let transformPath = route.requestPath.replaceAll('/*', '/(.*)');
let transformPath = route.requestPath.split('/*').join('/(.*)');
if (transformPath === '*') {
transformPath = '(.*)';
}