MCPcopy Index your code
hub / github.com/koding/kite / ServeHTTP

Method ServeHTTP

reverseproxy/reverseproxy.go:96–105  ·  view source on GitHub ↗

ServeHTTP implements the http.Handler interface.

(rw http.ResponseWriter, req *http.Request)

Source from the content-addressed store, hash-verified

94
95// ServeHTTP implements the http.Handler interface.
96func (p *Proxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
97 if isWebsocket(req) {
98 // we don't use https explicitly, ssl termination is done here
99 req.URL.Scheme = "ws"
100 p.websocketProxy.ServeHTTP(rw, req)
101 return
102 }
103
104 p.httpProxy.ServeHTTP(rw, req)
105}
106
107// isWebsocket checks wether the incoming request is a part of websocket
108// handshake

Callers

nothing calls this directly

Calls 1

isWebsocketFunction · 0.85

Tested by

no test coverage detected