Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
chore: update doc and certmagic policy
Browse files Browse the repository at this point in the history
  • Loading branch information
clement2026 committed Sep 23, 2023
1 parent e5b4fe5 commit ca758b1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions example/talk.auto.tls.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
server:
# Provide your domain list and email, server will try to generate cert for you.
# Port 80 and 443 will be used. Request to HTTP(80) will be redirected to HTTPS(443)
# By default, CertMagic stores assets on the local file system in $HOME/.local/share/certmagic (and honors $XDG_DATA_HOME if set). CertMagic will create the directory if it does not exist. If writes are denied, things will not be happy, so make sure CertMagic can write to it!
tls:
auto-tls-domains:
- "a.example.com"
- "b.example.com"
auto-tls-lets-encrypt-email: "you@yours.com"
2 changes: 1 addition & 1 deletion internal/start_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func StartServer() {
// provide an email address
certmagic.DefaultACME.Email = tls.AutoTlsLetsEncryptEmail
// use the staging endpoint while we're developing
certmagic.DefaultACME.CA = certmagic.LetsEncryptStagingCA
certmagic.DefaultACME.CA = certmagic.LetsEncryptProductionCA
e.Logger.Fatal(certmagic.HTTPS(tls.AutoTlsDomains, e))
} else {
addr := fmt.Sprintf(":%d", conf.Server.Port)
Expand Down

0 comments on commit ca758b1

Please sign in to comment.