|
@@ -18,19 +18,25 @@ func GetDnsChallengeProviderByName(dnsProvider string, dnsCredentials string, pp
|
|
|
}
|
|
|
|
|
|
//Clear the PollingInterval and PropagationTimeout field and conert to int
|
|
|
- userDefinedPollingIntervalRaw := dnsCredentialsMap["PollingInterval"].(string)
|
|
|
- userDefinedPropagationTimeoutRaw := dnsCredentialsMap["PropagationTimeout"].(string)
|
|
|
- delete(dnsCredentialsMap, "PollingInterval")
|
|
|
- delete(dnsCredentialsMap, "PropagationTimeout")
|
|
|
-
|
|
|
- userDefinedPollingInterval, err := strconv.Atoi(userDefinedPollingIntervalRaw)
|
|
|
- if err != nil {
|
|
|
- userDefinedPollingInterval = 30
|
|
|
+ userDefinedPollingInterval := 30
|
|
|
+ if dnsCredentialsMap["PollingInterval"] != nil {
|
|
|
+ userDefinedPollingIntervalRaw := dnsCredentialsMap["PollingInterval"].(string)
|
|
|
+ delete(dnsCredentialsMap, "PollingInterval")
|
|
|
+ convertedPollingInterval, err := strconv.Atoi(userDefinedPollingIntervalRaw)
|
|
|
+ if err == nil {
|
|
|
+ userDefinedPollingInterval = convertedPollingInterval
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- userDefinedPropagationTimeout, err := strconv.Atoi(userDefinedPropagationTimeoutRaw)
|
|
|
- if err != nil {
|
|
|
- userDefinedPropagationTimeout = 300
|
|
|
+ userDefinedPropagationTimeout := ppgTimeout
|
|
|
+ if dnsCredentialsMap["PropagationTimeout"] != nil {
|
|
|
+ userDefinedPropagationTimeoutRaw := dnsCredentialsMap["PropagationTimeout"].(string)
|
|
|
+ delete(dnsCredentialsMap, "PropagationTimeout")
|
|
|
+ convertedPropagationTimeout, err := strconv.Atoi(userDefinedPropagationTimeoutRaw)
|
|
|
+ if err == nil {
|
|
|
+ //Overwrite the default propagation timeout if it is requeted from UI
|
|
|
+ userDefinedPropagationTimeout = convertedPropagationTimeout
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//Restructure dnsCredentials string from map
|