Skip to content

Commit

Permalink
fix: cors 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
NaayoungKwon committed Nov 23, 2022
1 parent d6829fe commit 0c769b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/apps/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import * as cookieParser from 'cookie-parser';

async function bootstrap() {
const app = await NestFactory.create(ApiModule);
app.enableCors();
app.enableCors({
origin: true,
methods: 'GET,HEAD,PUT,PATCH,POST,DELETE,OPTIONS',
credentials: true,
});
if (process.env.NODE_ENV == 'prod') {
Sentry.init({
dsn: process.env.SENTRY_DSN,
Expand Down

1 comment on commit 0c769b6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests Skipped Failures Errors Time
13 0 💤 0 ❌ 0 🔥 1m 3s ⏱️
Coverage Report (40%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files41.2139.5827.6540.08 
apps0000 
   webhook.interceptor.ts00001–32
apps/api/src100100100100 
   api.service.ts100100100100 
apps/api/src/auth0000 
   auth.service.ts00001–49
apps/api/src/auth/dto01001000 
   index.ts010010001–2
apps/api/src/auth/guard01001000 
   index.ts010010001–2
   jwt-access.guard.ts010010001–5
   jwt-refresh.guard.ts010010001–5
apps/api/src/auth/helper010000 
   signToken.ts0100001–28
apps/api/src/auth/strategy0000 
   index.ts010010001–2
   jwt-access.strategy.ts00001–22
   jwt-refresh.strategy.ts00001–39
apps/api/src/channel01001000 
   channel.service.ts010010001–4
apps/api/src/community4504038.88 
   community.service.ts4504038.8822–51
apps/api/src/user92.6886.3610091.89 
   user.service.ts92.6886.3610091.8915, 65, 82
apps/api/test010000 
   app.e2e-spec.ts0100001–19
apps/socket/src100100100100 
   socket.service.ts100100100100 
apps/socket/test010000 
   app.e2e-spec.ts0100001–19
dao/repository48.4810015.3841.37 
   community.repository.ts57.14100255012–23
   user.repository.ts42.110011.1135.2912–43
dao/schemas100100100100 
   community.schema.ts100100100100 
   user.schema.ts100100100100 
utils100100100100 
   def.ts100100100100 

Please sign in to comment.