mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-01 16:45:40 +02:00
use smtp user if no no-reply set
This commit is contained in:
parent
a57f0ab360
commit
60110350aa
6 changed files with 13 additions and 7 deletions
|
@ -41,7 +41,7 @@ const configSchema = z.object({
|
|||
.transform((url) => url.toLowerCase()),
|
||||
log_level: z.enum(["debug", "info", "warn", "error"]),
|
||||
save_logs: z.boolean(),
|
||||
log_failed_attempts: z.boolean().optional(),
|
||||
log_failed_attempts: z.boolean().optional()
|
||||
}),
|
||||
server: z.object({
|
||||
external_port: portSchema
|
||||
|
@ -128,7 +128,7 @@ const configSchema = z.object({
|
|||
smtp_user: z.string().optional(),
|
||||
smtp_pass: z.string().optional(),
|
||||
smtp_secure: z.boolean().optional(),
|
||||
no_reply: z.string().email()
|
||||
no_reply: z.string().email().optional()
|
||||
})
|
||||
.optional(),
|
||||
users: z.object({
|
||||
|
@ -280,6 +280,12 @@ export class Config {
|
|||
return this.rawConfig.app.base_domain;
|
||||
}
|
||||
|
||||
public getNoReplyEmail(): string | undefined {
|
||||
return (
|
||||
this.rawConfig.email?.no_reply || this.rawConfig.email?.smtp_user
|
||||
);
|
||||
}
|
||||
|
||||
private createTraefikConfig() {
|
||||
try {
|
||||
// check if traefik_config.yml and dynamic_config.yml exists in APP_PATH/traefik
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue