mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
fix(server): selfhost should not use canary mobile pages (#9929)
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user