Skip to content

Commit cd6231c

Browse files
committed
Add more docs
1 parent 5093ec6 commit cd6231c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

websocketproxy.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ func (w *WebsocketProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
8989
// Pass X-Forwarded-For headers too, code below is a part of
9090
// httputil.ReverseProxy. See http://en.wikipedia.org/wiki/X-Forwarded-For
9191
// for more information
92+
// TODO: use RFC7239 http://tools.ietf.org/html/rfc7239
9293
if clientIP, _, err := net.SplitHostPort(req.RemoteAddr); err == nil {
9394
// If we aren't the first proxy retain prior
9495
// X-Forwarded-For information as a comma+space
@@ -109,7 +110,8 @@ func (w *WebsocketProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request) {
109110

110111
// Connect to the backend URL, also pass the headers we prepared above.
111112
// TODO: support multiplexing on the same backend connection instead of
112-
// opening a new TCP connection time for each request.
113+
// opening a new TCP connection time for each request. This should be
114+
// optional.
113115
connBackend, resp, err := dialer.Dial(backendURL.String(), h)
114116
if err != nil {
115117
log.Printf("websocketproxy: couldn't dial to remote backend url %s\n", err)

0 commit comments

Comments
 (0)