@marcel91200 / caddy Mirror · read-only / commits / d7d16360
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 13, 00:30 UTC

reverseproxy: Export ipVersions type (#5648)

allows AUpstreams to be instantiated externally

Omar Ramadan committed Jul 25, 2023 at 21:50 UTC d7d16360d41159a3bea772c36e795bab31503897
2 files changed +3 -3
modules/caddyhttp/reverseproxy/caddyfile.go
+1 -1
@@ -1449,7 +1449,7 @@ func (u *AUpstreams) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
1449 }
1450
1451 if u.Versions == nil {
1452 - u.Versions = &ipVersions{}
1452 + u.Versions = &IPVersions{}
1453 }
1454
1455 trueBool := true
modules/caddyhttp/reverseproxy/upstreams.go
+2 -2
@@ -212,7 +212,7 @@ func (sl srvLookup) isFresh() bool {
212 return time.Since(sl.freshness) < time.Duration(sl.srvUpstreams.Refresh)
213 }
214
215 -type ipVersions struct {
215 +type IPVersions struct {
216 IPv4 *bool `json:"ipv4,omitempty"`
217 IPv6 *bool `json:"ipv6,omitempty"`
218 }
@@ -247,7 +247,7 @@ type AUpstreams struct {
247 // The IP versions to resolve for. By default, both
248 // "ipv4" and "ipv6" will be enabled, which
249 // correspond to A and AAAA records respectively.
250 - Versions *ipVersions `json:"versions,omitempty"`
250 + Versions *IPVersions `json:"versions,omitempty"`
251
252 resolver *net.Resolver
253 }