Skip to content

Commit

Permalink
fix acmedns challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
pomdtr committed Jan 24, 2025
1 parent 03300f7 commit 20d5066
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ func NewCmdRoot(changelog string) *cobra.Command {
return "domain", v
case "SMALLWEB_REMOTE":
return "remote", v
case "SMALLWEB_EMAIL":
return "email", v
case "SMALLWEB_CUSTOM_DOMAINS":
customDomains := make(map[string]string)
for _, entry := range strings.Split(v, ";") {
Expand Down
5 changes: 4 additions & 1 deletion cmd/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,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)
go certmagic.HTTPS([]string{
k.String("domain"),
fmt.Sprintf("*.%s", k.String("domain")),
}, handler)
} else {
if email := k.String("email"); email != "" {
certmagic.DefaultACME.Email = email
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ require (
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/knadh/koanf/providers/confmap v0.1.0
github.com/knadh/koanf/providers/posflag v0.1.0
github.com/libdns/acmedns v0.2.0
github.com/mhale/smtpd v0.8.3
github.com/pkg/sftp v1.13.7
github.com/robfig/cron/v3 v3.0.1
Expand Down Expand Up @@ -126,7 +127,6 @@ require (
github.com/kr/fs v0.1.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/libdns/acmedns v0.2.0 // indirect
github.com/libdns/libdns v0.2.2 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand Down

0 comments on commit 20d5066

Please sign in to comment.