fix(server): should not enable experimental mobile version in selfhost (#8840)

This commit is contained in:
liuyi
2024-11-15 17:47:34 +08:00
committed by GitHub
parent 1f71e87460
commit 84cfcb193f

View File

@@ -147,7 +147,9 @@ export class SelfhostModule implements OnModuleInit {
// fallback all unknown routes // fallback all unknown routes
app.get([basePath, basePath + '/*'], this.check.use, (req, res) => { app.get([basePath, basePath + '/*'], this.check.use, (req, res) => {
const mobile = isMobile({ const mobile =
this.config.AFFINE_ENV === 'dev' &&
isMobile({
ua: req.headers['user-agent'] ?? undefined, ua: req.headers['user-agent'] ?? undefined,
}); });