diff --git a/viper.go b/viper.go index f61f4ed..cd257a3 100644 --- a/viper.go +++ b/viper.go @@ -1790,6 +1790,12 @@ func (v *Viper) getRemoteConfig(provider RemoteProvider) (map[string]interface{} if err != nil { return nil, err } + + providerType := strings.Split(provider.Path(), ".")[len(strings.Split(provider.Path(), "."))-1] + if v.getConfigType() == "" && stringInSlice(providerType, SupportedExts) { + SetConfigType(providerType) + } + err = v.unmarshalReader(reader, v.kvstore) return v.kvstore, err }