fix(server): selfhost should not use canary mobile pages (#9929)
This commit is contained in:
@@ -20,7 +20,7 @@ function getPredefinedAFFiNEConfig(): PreDefinedAFFiNEConfig {
|
|||||||
'production',
|
'production',
|
||||||
'script',
|
'script',
|
||||||
]);
|
]);
|
||||||
const AFFINE_ENV = readEnv<AFFINE_ENV>('AFFINE_ENV', 'dev', [
|
const AFFINE_ENV = readEnv<AFFINE_ENV>('AFFINE_ENV', 'production', [
|
||||||
'dev',
|
'dev',
|
||||||
'beta',
|
'beta',
|
||||||
'production',
|
'production',
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ export class StaticFilesResolver 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 =
|
const mobile =
|
||||||
this.config.AFFINE_ENV === 'dev' &&
|
this.config.affine.canary &&
|
||||||
isMobile({
|
isMobile({
|
||||||
ua: req.headers['user-agent'] ?? undefined,
|
ua: req.headers['user-agent'] ?? undefined,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user