Skip to content

Commit 1713766

Browse files
authored
Limit graphql middleware to graphql routes (#2907)
1 parent 76f6d0f commit 1713766

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/graphql/graphql.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export class GraphqlModule implements NestModule {
3636

3737
configure(consumer: MiddlewareConsumer) {
3838
const uploadMiddleware = createUploadMiddleware();
39-
consumer.apply(this.middleware.use, uploadMiddleware).forRoutes('*');
39+
consumer
40+
.apply(this.middleware.use, uploadMiddleware)
41+
.forRoutes('/graphql', '/graphql/*');
4042
}
4143
}

0 commit comments

Comments
 (0)