Skip to content

Commit

Permalink
Fix cors problem
Browse files Browse the repository at this point in the history
  • Loading branch information
CaramelFur committed Nov 28, 2023
1 parent dab1187 commit acca12f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const imageCorsOverride = (
})
export class AppModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer.apply(mainCorsConfig).exclude('/i').forRoutes('/');
consumer.apply(imageCorsConfig, imageCorsOverride).forRoutes('/i');
consumer.apply(mainCorsConfig).exclude('i/(.*)').forRoutes('*');
consumer.apply(imageCorsConfig, imageCorsOverride).forRoutes('i/(.*)');
}
}

0 comments on commit acca12f

Please sign in to comment.