Files
phishingclub/backend/acme/certmagic_prod.go
2025-08-21 16:14:09 +02:00

24 lines
534 B
Go

//go:build !dev
package acme
import (
_ "embed"
"github.com/caddyserver/certmagic"
"github.com/phishingclub/phishingclub/config"
"go.uber.org/zap"
"gorm.io/gorm"
)
// SetupCertMagic creates a certmagic config for development
// and checks which domains are allowed from the db before getting a certificate
func SetupCertMagic(
certStoragePath string,
conf *config.Config,
db *gorm.DB,
logger *zap.SugaredLogger,
) (*certmagic.Config, *certmagic.Cache, error) {
return setupCertMagic(certStoragePath, conf, db, logger)
}