From acca12f2e563b831a017eb06b9d1fdb44a5432d4 Mon Sep 17 00:00:00 2001 From: Caramel Date: Tue, 28 Nov 2023 19:40:15 +0100 Subject: [PATCH] Fix cors problem --- backend/src/app.module.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/app.module.ts b/backend/src/app.module.ts index 1485838..91c5f93 100644 --- a/backend/src/app.module.ts +++ b/backend/src/app.module.ts @@ -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/(.*)'); } }