Skip to content

Commit a5d030e

Browse files
committed
feat: add HttpModule with async configuration to CommonModule
1 parent 9f34924 commit a5d030e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/common/common.module.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { HttpModule } from "@nestjs/axios"
12
import { Global, Module } from "@nestjs/common"
23
import { AwsService } from "./aws/aws.service"
34
import { DateUtilService } from "./date-util/date-util.service"
@@ -8,7 +9,17 @@ import { RedisModule } from "./redis/redis.module"
89

910
@Global()
1011
@Module({
11-
imports: [RedisModule],
12+
imports: [
13+
RedisModule,
14+
HttpModule.registerAsync({
15+
useFactory: async () => {
16+
return {
17+
timeout: 60_000,
18+
maxRedirects: 3,
19+
}
20+
},
21+
}),
22+
],
1223
providers: [
1324
PrismaService,
1425
MetadataExtractorService,

0 commit comments

Comments
 (0)