fix(server): selfhost should not use canary mobile pages (#9929)

This commit is contained in:
liuyi
2025-02-02 18:00:51 +08:00
committed by GitHub
parent 2084b86797
commit a95803d33b
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ function getPredefinedAFFiNEConfig(): PreDefinedAFFiNEConfig {
'production',
'script',
]);
const AFFINE_ENV = readEnv<AFFINE_ENV>('AFFINE_ENV', 'dev', [
const AFFINE_ENV = readEnv<AFFINE_ENV>('AFFINE_ENV', 'production', [
'dev',
'beta',
'production',

View File

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