httpproxy

package
v3.7.0-0.124.0+incompa... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

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

ServeHTTP inspects the request and either proxies an upgraded connection directly, or uses httputil.ReverseProxy to proxy the normal request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL