1
0
mirror of https://github.com/go-acme/lego.git synced 2024-11-25 00:56:20 +02:00

volcengine: set API information within the default configuration (#2308)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
刘瑞斌 2024-10-21 20:08:03 +08:00 committed by GitHub
parent d6c1ed9138
commit 6051473ffc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,6 +54,10 @@ type Config struct {
// NewDefaultConfig returns a default configuration for the DNSProvider.
func NewDefaultConfig() *Config {
return &Config{
Scheme: env.GetOrDefaultString(EnvScheme, "https"),
Host: env.GetOrDefaultString(EnvHost, "open.volcengineapi.com"),
Region: env.GetOrDefaultString(EnvRegion, volc.DefaultRegion),
TTL: env.GetOrDefaultInt(EnvTTL, defaultTTL),
PropagationTimeout: env.GetOrDefaultSecond(EnvPropagationTimeout, 240*time.Second),
PollingInterval: env.GetOrDefaultSecond(EnvPollingInterval, 10*time.Second),
@ -81,9 +85,6 @@ func NewDNSProvider() (*DNSProvider, error) {
config := NewDefaultConfig()
config.AccessKey = values[EnvAccessKey]
config.SecretKey = values[EnvSecretKey]
config.Scheme = env.GetOrDefaultString(EnvScheme, "https")
config.Host = env.GetOrDefaultString(EnvHost, "open.volcengineapi.com")
config.Region = env.GetOrDefaultString(EnvRegion, volc.DefaultRegion)
return NewDNSProviderConfig(config)
}