mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-22 04:32:02 +02:00
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:
@@ -48,9 +48,9 @@ func NewProxy(upstreams options.UpstreamConfig, sigData *options.SignatureData,
|
||||
if err := m.registerFileServer(upstream, u, writer); err != nil {
|
||||
return nil, fmt.Errorf("could not register file upstream %q: %v", upstream.ID, err)
|
||||
}
|
||||
case httpScheme, httpsScheme:
|
||||
case httpScheme, httpsScheme, unixScheme:
|
||||
if err := m.registerHTTPUpstreamProxy(upstream, u, sigData, writer); err != nil {
|
||||
return nil, fmt.Errorf("could not register HTTP upstream %q: %v", upstream.ID, err)
|
||||
return nil, fmt.Errorf("could not register %s upstream %q: %v", u.Scheme, upstream.ID, err)
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown scheme for upstream %q: %q", upstream.ID, u.Scheme)
|
||||
|
||||
Reference in New Issue
Block a user