feat(api): Protokollzeile je Anfrage und je Nextcloud-Pruefung im Docker-Log
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,12 +3,16 @@ import { ConfigService } from '@nestjs/config';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import cookieParser from 'cookie-parser';
|
||||
import { AppModule } from './app.module';
|
||||
import { requestLogMiddleware } from './common/request-log';
|
||||
import { formatAppVersionLine } from './health/app-version';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
const configService = app.get(ConfigService);
|
||||
|
||||
// Eine Zeile je Anfrage im Docker-Log (Pfad, Status, Dauer, Benutzer)
|
||||
app.use(requestLogMiddleware);
|
||||
|
||||
// Cookie parser for JWT httpOnly cookies
|
||||
app.use(cookieParser());
|
||||
|
||||
@@ -21,10 +25,7 @@ async function bootstrap() {
|
||||
);
|
||||
|
||||
// CORS with credentials for cross-origin cookie support (Pitfall 4)
|
||||
const corsOrigin = configService.get<string>(
|
||||
'CORS_ORIGIN',
|
||||
'http://localhost:3000',
|
||||
);
|
||||
const corsOrigin = configService.get<string>('CORS_ORIGIN', 'http://localhost:3000');
|
||||
app.enableCors({
|
||||
origin: corsOrigin,
|
||||
credentials: true,
|
||||
|
||||
Reference in New Issue
Block a user