Skip to content

Commit

Permalink
network enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
EliasSchaut committed Sep 18, 2024
1 parent 0fb9d45 commit e27fd16
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions server/nest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export async function createApp(): Promise<INestApplication> {
helmet({
contentSecurityPolicy: {
directives: {
imgSrc: ["'self'", 'data:', 'https://cdn.jsdelivr.net'],
styleSrc: [`'self'`, `'unsafe-inline'`, 'https://cdn.jsdelivr.net'],
imgSrc: ["'self'"],
styleSrc: [`'self'`],
scriptSrc: ["'self'", "https: 'unsafe-inline'", "'unsafe-eval'"],
objectSrc: ["'self'"],
defaultSrc: [`'self'`],
Expand All @@ -23,6 +23,11 @@ export async function createApp(): Promise<INestApplication> {
crossOriginEmbedderPolicy: false,
}),
);
app.enableCors({
origin: '*',
methods: 'GET,POST,DELETE',
props: 'Content-Type',
});
const config = new DocumentBuilder()
.setTitle('CocktailCalc API')
.setDescription(
Expand Down

0 comments on commit e27fd16

Please sign in to comment.