Skip to content

Commit

Permalink
add back email field
Browse files Browse the repository at this point in the history
  • Loading branch information
pomdtr committed Jan 24, 2025
1 parent c90f4ab commit a0c6ee0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ func NewCmdUp() *cobra.Command {
fmt.Fprintf(os.Stderr, "Serving *.%s from %s with on-demand TLS...\n", k.String("domain"), utils.AddTilde(k.String("dir")))
go certmagic.HTTPS(nil, handler)
} else if flags.acmednsUsername != "" {
if email := k.String("email"); email != "" {
certmagic.DefaultACME.Email = email
}

certmagic.DefaultACME.DNS01Solver = &certmagic.DNS01Solver{
DNSManager: certmagic.DNSManager{
DNSProvider: &acmedns.Provider{
Expand All @@ -146,6 +150,10 @@ func NewCmdUp() *cobra.Command {
fmt.Fprintf(os.Stderr, "Serving *.%s from %s...\n", k.String("domain"), utils.AddTilde(k.String("dir")))
go certmagic.HTTPS(nil, handler)
} else {
if email := k.String("email"); email != "" {
certmagic.DefaultACME.Email = email
}

addr := flags.httpAddr
if addr == "" {
if flags.certFile != "" || flags.keyFile != "" {
Expand Down
5 changes: 5 additions & 0 deletions schemas/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"type": "string"
}
},
"email": {
"description": "Admin email, used for certificate registration",
"type": "string",
"format": "email"
},
"adminApps": {
"description": "Admin apps",
"type": "array",
Expand Down

0 comments on commit a0c6ee0

Please sign in to comment.