1
0
Fork 0
mirror of https://codeberg.org/Codeberg/pages-server.git synced 2025-08-13 19:10:54 +00:00

Add redis for caching, first try during a train ride so expect it to not be working yet

This commit is contained in:
Moritz Marquardt 2024-03-24 20:24:32 +01:00
parent b8b9886ee1
commit 5b6eecc75f
12 changed files with 149 additions and 32 deletions

View file

@ -6,6 +6,7 @@ import (
"crypto/x509"
"errors"
"fmt"
"github.com/OrlovEvgeny/go-mcache"
"strconv"
"strings"
"time"
@ -31,7 +32,7 @@ func TLSConfig(mainDomainSuffix string,
giteaClient *gitea.Client,
acmeClient *AcmeClient,
firstDefaultBranch string,
keyCache, challengeCache, dnsLookupCache, canonicalDomainCache cache.ICache,
keyCache *mcache.CacheDriver, challengeCache cache.ICache, dnsLookupCache *mcache.CacheDriver, canonicalDomainCache cache.ICache,
certDB database.CertDB,
noDNS01 bool,
rawDomain string,
@ -56,7 +57,7 @@ func TLSConfig(mainDomainSuffix string,
if !ok {
return nil, errors.New("no challenge for this domain")
}
cert, err := tlsalpn01.ChallengeCert(domain, challenge.(string))
cert, err := tlsalpn01.ChallengeCert(domain, challenge)
if err != nil {
return nil, err
}