Compare commits

...
5 Commits
4 changed files with 15 additions and 6 deletions
+1
View File
@@ -13,3 +13,4 @@ hostname: maestro.stg.dadosfera.ai
replicaCount: 1
affinity: null
+1 -1
View File
@@ -50,4 +50,4 @@ charts:
- name: replicaCount
value: 1
- name: maestro.restricted_ip
value: "177.52.172.0/24,189.84.160.157/32,186.237.171.146/32,57.151.113.140/30"
value: "177.52.172.0/24,189.84.160.157/32,186.237.171.146/32,10.70.1.0/24"
+1
View File
@@ -114,6 +114,7 @@ export class AuthController {
return res.send(data);
} catch (error) {
this.logger.error('/auth - SignIn - ERROR', error);
throw error;
}
}
+12 -5
View File
@@ -5,18 +5,25 @@ import { redisStore } from 'cache-manager-ioredis-yet';
@Module({
imports: [
CacheModule.registerAsync({
useFactory: async () => ({
store: await redisStore({
useFactory: async () => {
const baseRedisConfig = {
ttl: 5 * 1000 * 60, // 5 minute
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT && Number(process.env.REDIS_PORT),
db: process.env.REDIS_DATABASE && Number(process.env.REDIS_DATABASE),
keyPrefix: 'maestro:sso',
tls: {
}
if (process.env.ENV !== 'local') {
baseRedisConfig['tls'] = {
servername: process.env.REDIS_HOST,
}
}),
}),
}
return {
store: await redisStore(baseRedisConfig),
}
},
}),
],
providers: [CacheService],