third commit

This commit is contained in:
Дмитрий Мамедов
2026-06-10 17:01:10 +03:00
parent d393cbe1db
commit 00919968f2
21 changed files with 721 additions and 274 deletions

View File

@@ -16,7 +16,20 @@ async function bootstrap(): Promise<void> {
const logger = app.get(Logger);
app.useLogger(logger);
app.use(helmet.default({ contentSecurityPolicy: false }));
app.use(
helmet.default({
contentSecurityPolicy: {
directives: {
defaultSrc: ["'self'"],
scriptSrc: ["'self'", 'https://cdn.jsdelivr.net'],
styleSrc: ["'self'", 'https://cdn.jsdelivr.net', "'unsafe-inline'"],
imgSrc: ["'self'", 'data:'],
fontSrc: ["'self'", 'https://cdn.jsdelivr.net'],
connectSrc: ["'self'"],
},
},
}),
);
app.use(cookieParser());
app.enableCors({