hcaptcha
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { ConfigModule, ConfigService } from '@nestjs/config';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import {
|
||||
GoogleRecaptchaModule,
|
||||
GoogleRecaptchaNetwork,
|
||||
} from '@nestlab/google-recaptcha';
|
||||
|
||||
import { AuthModule } from './auth/auth.module';
|
||||
import { BcryptModule } from './bcrypt/bcrypt.module';
|
||||
@@ -99,17 +95,6 @@ import { ModuloMotivoModule } from './modulo-motivo/modulo-motivo.module';
|
||||
@Module({
|
||||
imports: [
|
||||
ConfigModule.forRoot({ isGlobal: true }),
|
||||
GoogleRecaptchaModule.forRootAsync({
|
||||
inject: [ConfigService],
|
||||
useFactory: (configService: ConfigService) => {
|
||||
return {
|
||||
secretKey: configService.get<string>('GOOGLE_RECAPTCHA_KEY'),
|
||||
response: (req) => req.headers.recaptcha,
|
||||
skipIf: configService.get<string>('STATE') !== 'produccion',
|
||||
network: GoogleRecaptchaNetwork.Recaptcha,
|
||||
};
|
||||
},
|
||||
}),
|
||||
TypeOrmModule.forRootAsync({
|
||||
inject: [ConfigService],
|
||||
useFactory: (configService: ConfigService) => {
|
||||
|
||||
Reference in New Issue
Block a user