Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(server): wrong public path for selfhosted doc renderer (#8660)

forehaloe87963eca4b4
diff --git a/packages/backend/server/src/core/doc-renderer/controller.ts b/packages/backend/server/src/core/doc-renderer/controller.ts
index 7ab95f312a..9c7fb17f79 100644
--- a/packages/backend/server/src/core/doc-renderer/controller.ts
+++ b/packages/backend/server/src/core/doc-renderer/controller.ts
@@ -222,9 +222,7 @@ export class DocRendererController {
readFileSync(manifestPath, 'utf-8')
);
- const publicPath = this.config.isSelfhosted
- ? this.config.server.host + '/'
- : assets.publicPath;
+ const publicPath = this.config.isSelfhosted ? '/' : assets.publicPath;
assets.publicPath = publicPath;
assets.js = assets.js.map(path => publicPath + path);