Skip to content

Commit 221003a

Browse files
authored
Revert "using mount path when mounted as express module" (#501)
1 parent 5ec4384 commit 221003a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Parse-Dashboard/app.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ packageJson('parse-dashboard', 'latest').then(latestPackage => {
1717
});
1818

1919
function getMount(req) {
20-
const url = req.url;
21-
const originalUrl = req.originalUrl;
22-
const mountPath = process.env.MOUNT_PATH || '';
23-
const mountPathLength = req.originalUrl.length - req.url.length;
24-
let mountPathLocal = req.originalUrl.slice(0, mountPathLength);
25-
if (!mountPathLocal.endsWith('/')) {
26-
mountPathLocal += '/';
20+
let url = req.url;
21+
let originalUrl = req.originalUrl;
22+
var mountPathLength = req.originalUrl.length - req.url.length;
23+
var mountPath = req.originalUrl.slice(0, mountPathLength);
24+
if (!mountPath.endsWith('/')) {
25+
mountPath += '/';
2726
}
28-
return mountPath + mountPathLocal;
27+
return mountPath;
2928
}
3029

3130
function checkIfIconsExistForApps(apps, iconsFolder) {

0 commit comments

Comments
 (0)