Fixed DynamicRedirectManager initialization

refs https://linear.app/tryghost/issue/CORE-84/have-a-look-at-the-eggs-redirects-refactor-branch

- After a bump of the '@tryghost/express-dynamic-redirects' the constructor has changed it's signature, so this needed an adjustment
This commit is contained in:
Naz 2021-10-13 11:53:57 +02:00 committed by naz
parent f4e725a7ef
commit e1d16a55e1

View File

@ -5,8 +5,11 @@ const DynamicRedirectManager = require('@tryghost/express-dynamic-redirects');
const CustomRedirectsAPI = require('./api');
const redirectManager = new DynamicRedirectManager({
permanentMaxAge: config.get('caching:customRedirects:maxAge')
}, urlUtils);
permanentMaxAge: config.get('caching:customRedirects:maxAge'),
getSubdirectoryURL: (pathname) => {
return urlUtils.urlJoin(urlUtils.getSubdir(), pathname);
}
});
let customRedirectsAPI;