feat: Update route patterns to use path-to-regexp v8 syntax (#9942)

BREAKING CHANGE: Route pattern syntax across cloud routes and rate-limiting now use the new path-to-regexp v8 syntax; see the [migration guide](https://github.com/parse-community/parse-server/blob/alpha/9.0.0.md) for more details.
This commit is contained in:
Lucas
2025-12-12 19:36:27 +01:00
committed by GitHub
parent 5a61993cb7
commit fa8723b3d1
10 changed files with 100 additions and 105 deletions

View File

@@ -82,12 +82,12 @@ const getRoute = parseClass => {
'@Config' : 'config',
}[parseClass] || 'classes';
if (parseClass === '@File') {
return `/${route}/:id?(.*)`;
return `/${route}{/*id}`;
}
if (parseClass === '@Config') {
return `/${route}`;
}
return `/${route}/${parseClass}/:id?(.*)`;
return `/${route}/${parseClass}{/*id}`;
};
/** @namespace
* @name Parse