fix: Do not prefetch JS bundles on public share links
This commit is contained in:
@@ -52,6 +52,7 @@ const renderApp = async (ctx: Context, next: Next, title = "Outline") => {
|
||||
return next();
|
||||
}
|
||||
|
||||
const { shareId } = ctx.params;
|
||||
const page = await readIndexFile(ctx);
|
||||
const environment = `
|
||||
window.env = ${JSON.stringify(presentEnv(env))};
|
||||
@@ -60,7 +61,7 @@ const renderApp = async (ctx: Context, next: Next, title = "Outline") => {
|
||||
.toString()
|
||||
.replace(/\/\/inject-env\/\//g, environment)
|
||||
.replace(/\/\/inject-title\/\//g, title)
|
||||
.replace(/\/\/inject-prefetch\/\//g, prefetchTags)
|
||||
.replace(/\/\/inject-prefetch\/\//g, shareId ? "" : prefetchTags)
|
||||
.replace(/\/\/inject-slack-app-id\/\//g, process.env.SLACK_APP_ID || "");
|
||||
};
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
"Templatize": "Templatize",
|
||||
"Create template": "Create template",
|
||||
"Home": "Home",
|
||||
"Search": "Search",
|
||||
"Search documents for \"{{searchQuery}}\"": "Search documents for \"{{searchQuery}}\"",
|
||||
"Drafts": "Drafts",
|
||||
"Templates": "Templates",
|
||||
@@ -123,6 +122,7 @@
|
||||
"Choose icon": "Choose icon",
|
||||
"Loading": "Loading",
|
||||
"Loading editor": "Loading editor",
|
||||
"Search": "Search",
|
||||
"Default access": "Default access",
|
||||
"View and edit": "View and edit",
|
||||
"View only": "View only",
|
||||
|
||||
Reference in New Issue
Block a user