ghost 4.38.0 → 4.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -27,13 +27,13 @@ const uncapitalise = (req, res, next) => {
|
|
|
27
27
|
let decodedURI;
|
|
28
28
|
|
|
29
29
|
const isSignupOrReset = pathToTest.match(/^(.*\/ghost\/(signup|reset)\/)/i);
|
|
30
|
-
const isAPI = pathToTest.match(/^(.*\/ghost\/api\/(v[\d.]+|canary)
|
|
30
|
+
const isAPI = pathToTest.match(/^(.*\/ghost\/api(\/(v[\d.]+|canary))?\/.*?\/)/i);
|
|
31
31
|
|
|
32
32
|
if (isSignupOrReset) {
|
|
33
33
|
pathToTest = isSignupOrReset[1];
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
// Do not lowercase anything after e.g. /api/v{X}
|
|
36
|
+
// Do not lowercase anything after e.g. /ghost/api(/v{X})?/ to protect :key/:slug
|
|
37
37
|
if (isAPI) {
|
|
38
38
|
pathToTest = isAPI[1];
|
|
39
39
|
}
|