Add support for unix socket as upstream (#1866)

* Add support for unix socket as upstream

* Add CHANGELOG.md entry

* Add Unix socket documentation

* Don't export unixRoundTripper, switch from string prefix to Scheme match

* Add basic unix server mock

* Add some tests and comments
This commit is contained in:
Damien Degois
2023-10-26 10:57:00 +01:00
committed by GitHub
parent 4816e87316
commit 70571d96e1
9 changed files with 108 additions and 9 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ func validateUpstreamURI(upstream options.Upstream) []string {
}
switch u.Scheme {
case "http", "https", "file":
case "http", "https", "file", "unix":
// Valid, do nothing
default:
msgs = append(msgs, fmt.Sprintf("upstream %q has invalid scheme: %q", upstream.ID, u.Scheme))