|
|
@@ -438,7 +438,7 @@ async function injectPageData(context: GetServerSidePropsContext, props: Props):
|
|
|
|
|
|
const Page = crowi.model('Page') as PageModel;
|
|
|
const PageRedirect = mongooseModel('PageRedirect') as PageRedirectModel;
|
|
|
- const { pageService } = crowi;
|
|
|
+ const { pageService, configManager } = crowi;
|
|
|
|
|
|
let currentPathname = props.currentPathname;
|
|
|
|
|
|
@@ -477,7 +477,8 @@ async function injectPageData(context: GetServerSidePropsContext, props: Props):
|
|
|
if (page != null) {
|
|
|
page.initLatestRevisionField(revisionId);
|
|
|
props.isLatestRevision = page.isLatestRevision();
|
|
|
- props.skipSSR = await skipSSR(page, props.ssrMaxRevisionBodyLength);
|
|
|
+ const ssrMaxRevisionBodyLength = configManager.getConfig('crowi', 'app:ssrMaxRevisionBodyLength');
|
|
|
+ props.skipSSR = await skipSSR(page, ssrMaxRevisionBodyLength);
|
|
|
await page.populateDataToShowRevision(props.skipSSR); // shouldExcludeBody = skipSSR
|
|
|
}
|
|
|
|