mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-01 06:02:34 +03:00
chore(server): change the log level (#4106)
This commit is contained in:
parent
c0bf82d3ff
commit
18ac355df3
@ -27,7 +27,7 @@ import { Config } from './config';
|
||||
import { serverTimingAndCache } from './middleware/timing';
|
||||
import { RedisIoAdapter } from './modules/sync/redis-adapter';
|
||||
|
||||
const { NODE_ENV } = process.env;
|
||||
const { NODE_ENV, AFFINE_ENV } = process.env;
|
||||
|
||||
if (NODE_ENV === 'production') {
|
||||
const traceExporter = new TraceExporter();
|
||||
@ -60,7 +60,10 @@ if (NODE_ENV === 'production') {
|
||||
const app = await NestFactory.create<NestExpressApplication>(AppModule, {
|
||||
cors: true,
|
||||
bodyParser: true,
|
||||
logger: NODE_ENV === 'production' ? ['log'] : ['verbose'],
|
||||
logger:
|
||||
NODE_ENV !== 'production' || AFFINE_ENV !== 'production'
|
||||
? ['verbose']
|
||||
: ['log'],
|
||||
});
|
||||
|
||||
app.use(serverTimingAndCache);
|
||||
|
@ -127,6 +127,7 @@ export class NextAuthController {
|
||||
}
|
||||
|
||||
if (redirect?.endsWith('api/auth/error?error=AccessDenied')) {
|
||||
this.logger.debug(req.headers);
|
||||
if (!req.headers?.referer) {
|
||||
res.redirect('https://community.affine.pro/c/insider-general/');
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user