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): should not enable experimental mobile version in selfhost (#8840)

liuyi84cfcb193f91
diff --git a/packages/backend/server/src/core/selfhost/index.ts b/packages/backend/server/src/core/selfhost/index.ts
index e588028044..004edaf218 100644
--- a/packages/backend/server/src/core/selfhost/index.ts
+++ b/packages/backend/server/src/core/selfhost/index.ts
@@ -147,9 +147,11 @@ export class SelfhostModule implements OnModuleInit {
// fallback all unknown routes
app.get([basePath, basePath + '/*'], this.check.use, (req, res) => {
- const mobile = isMobile({
- ua: req.headers['user-agent'] ?? undefined,
- });
+ const mobile =
+ this.config.AFFINE_ENV === 'dev' &&
+ isMobile({
+ ua: req.headers['user-agent'] ?? undefined,
+ });
return res.sendFile(
join(