From ea723a86d28cd7437b81cf1645c37af4ccca56ed Mon Sep 17 00:00:00 2001 From: Gusted Date: Mon, 7 Nov 2022 15:52:44 +0100 Subject: [PATCH] Fatal on ACME Client creation failure (#132) - For production(*cough* Codeberg *cough*), it's important to not use mock certs. So fail right from the start if this is the case and not try to "handle it gracefully", as it would break production. - Resolves #131 CC @momar @6543 Co-authored-by: Gusted Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/132 Co-authored-by: Gusted Co-committed-by: Gusted --- server/certificates/certificates.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/certificates/certificates.go b/server/certificates/certificates.go index 660228b..429ab23 100644 --- a/server/certificates/certificates.go +++ b/server/certificates/certificates.go @@ -410,7 +410,7 @@ func SetupCertificates(mainDomainSuffix, dnsProvider string, acmeConfig *lego.Co acmeClient, err = lego.NewClient(acmeConfig) if err != nil { - log.Error().Err(err).Msg("Can't create ACME client, continuing with mock certs only") + log.Fatal().Err(err).Msg("Can't create ACME client, continuing with mock certs only") } else { err = acmeClient.Challenge.SetTLSALPN01Provider(AcmeTLSChallengeProvider{challengeCache}) if err != nil {