fix root not getting replaced

This commit is contained in:
Timo Hocker 2019-12-11 12:27:39 +01:00
parent 0ca4e754cb
commit 81283fd3c5

View File

@ -14,7 +14,7 @@ module.exports = function (app, modulefolder, opts = {}, subdir = '') {
let [, method, url] = regex.exec(f);
url = '/' + subdir + '/' + url + '/';
url = url
.replace(/^\/root/i, '/')
.replace(/^\/[^/]*\/root/i, '/')
.replace(/\./g, '/')
.replace(/\/+/g, '/');