 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package httpproxy contains an upgrade-aware HTTP single-host reverse proxy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UpgradeAwareSingleHostReverseProxy ¶
type UpgradeAwareSingleHostReverseProxy struct {
	// contains filtered or unexported fields
}
    UpgradeAwareSingleHostReverseProxy 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.
func NewUpgradeAwareSingleHostReverseProxy ¶
func NewUpgradeAwareSingleHostReverseProxy(clientConfig *restclient.Config, backendAddr *url.URL) (*UpgradeAwareSingleHostReverseProxy, error)
NewUpgradeAwareSingleHostReverseProxy creates a new UpgradeAwareSingleHostReverseProxy.
func (*UpgradeAwareSingleHostReverseProxy) RoundTrip ¶
RoundTrip sends the request to the backend and strips off the CORS headers before returning the response.
func (*UpgradeAwareSingleHostReverseProxy) ServeHTTP ¶
func (p *UpgradeAwareSingleHostReverseProxy) ServeHTTP(w http.ResponseWriter, req *http.Request)
ServeHTTP inspects the request and either proxies an upgraded connection directly, or uses httputil.ReverseProxy to proxy the normal request.
       Source Files
      ¶
      Source Files
      ¶
    
- doc.go
- upgradeawareproxy.go
 Click to show internal directories. 
   Click to hide internal directories.