{"modulePath":"github.com/2lambda123/openshift-origin","version":"v4.1.0+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package httpproxy\n\nPackage httpproxy contains an upgrade-aware HTTP single-host reverse proxy.\n\n## Types\n\n```go\ntype UpgradeAwareSingleHostReverseProxy struct {\n\t// contains filtered or unexported fields\n}\n```\nUpgradeAwareSingleHostReverseProxy is capable of proxying both regular HTTP connections and those that require upgrading (e.g. web sockets). It implements the http.RoundTripper and http.Handler interfaces.\n\n```go\nfunc NewUpgradeAwareSingleHostReverseProxy(clientConfig *restclient.Config, backendAddr *url.URL) (*UpgradeAwareSingleHostReverseProxy, error)\n```\nNewUpgradeAwareSingleHostReverseProxy creates a new UpgradeAwareSingleHostReverseProxy.\n\n```go\nfunc (p *UpgradeAwareSingleHostReverseProxy) RoundTrip(req *http.Request) (*http.Response, error)\n```\nRoundTrip sends the request to the backend and strips off the CORS headers before returning the response.\n\n```go\nfunc (p *UpgradeAwareSingleHostReverseProxy) ServeHTTP(w http.ResponseWriter, req *http.Request)\n```\nServeHTTP inspects the request and either proxies an upgraded connection directly, or uses httputil.ReverseProxy to proxy the normal request.\n\n","path":"github.com/2lambda123/openshift-origin/pkg/util/httpproxy","name":"httpproxy","synopsis":"Package httpproxy contains an upgrade-aware HTTP single-host reverse proxy.","isRedistributable":true}
