Skip to content

Commit

Permalink
fix(api): set database ssl on
Browse files Browse the repository at this point in the history
  • Loading branch information
Mefjus committed Mar 29, 2021
1 parent cba1d42 commit 695212a
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export interface DatabaseConfig {
database: string;
synchronize: boolean;
logging?: boolean;
ssl?: {
rejectUnauthorized: boolean;
};
}

@Injectable()
Expand All @@ -33,6 +36,16 @@ export class DatabaseConfigService {
};
}

if (this.config.environment.isProd) {
return {
...baseConfig,
database: this.config.database.database,
ssl: {
rejectUnauthorized: false,
},
};
}

return {
...baseConfig,
database: this.config.database.database,
Expand Down

0 comments on commit 695212a

Please sign in to comment.