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

This commit is contained in:
Daniel
2023-05-25 13:13:39 +02:00
committed by GitHub
parent b0b99e7451
commit f911f2cd3a
+1 -1
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 = '(.*)';
}