third commit
This commit is contained in:
15
src/main.ts
15
src/main.ts
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user