mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-30 22:34:15 -05:00
reverseproxy: Export ipVersions type (#5648)
allows AUpstreams to be instantiated externally
This commit is contained in:
parent
4df27a20c8
commit
d7d16360d4
2 changed files with 3 additions and 3 deletions
|
@ -1449,7 +1449,7 @@ func (u *AUpstreams) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
|
|||
}
|
||||
|
||||
if u.Versions == nil {
|
||||
u.Versions = &ipVersions{}
|
||||
u.Versions = &IPVersions{}
|
||||
}
|
||||
|
||||
trueBool := true
|
||||
|
|
|
@ -212,7 +212,7 @@ func (sl srvLookup) isFresh() bool {
|
|||
return time.Since(sl.freshness) < time.Duration(sl.srvUpstreams.Refresh)
|
||||
}
|
||||
|
||||
type ipVersions struct {
|
||||
type IPVersions struct {
|
||||
IPv4 *bool `json:"ipv4,omitempty"`
|
||||
IPv6 *bool `json:"ipv6,omitempty"`
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ type AUpstreams struct {
|
|||
// The IP versions to resolve for. By default, both
|
||||
// "ipv4" and "ipv6" will be enabled, which
|
||||
// correspond to A and AAAA records respectively.
|
||||
Versions *ipVersions `json:"versions,omitempty"`
|
||||
Versions *IPVersions `json:"versions,omitempty"`
|
||||
|
||||
resolver *net.Resolver
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue