File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
components/ws-proxy/pkg/proxy Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 55package proxy
66
77import (
8+ "bytes"
89 "crypto/tls"
10+ stdlog "log"
911 "net/http"
1012 "os"
1113 "path/filepath"
1214
13- "github.com/gitpod-io/golang-crypto/ssh"
1415 "github.com/gorilla/mux"
1516 "github.com/klauspost/cpuid/v2"
1617
1718 "github.com/gitpod-io/gitpod/common-go/log"
19+ "github.com/gitpod-io/golang-crypto/ssh"
1820)
1921
2022// WorkspaceProxy is the entity which forwards all inbound requests to the relevant workspace pods.
@@ -64,6 +66,7 @@ func (p *WorkspaceProxy) MustServe() {
6466 PreferServerCipherSuites : true ,
6567 NextProtos : []string {"h2" , "http/1.1" },
6668 },
69+ ErrorLog : stdlog .New (logrusErrorWriter {}, "" , 0 ),
6770 }
6871
6972 var (
@@ -141,3 +144,16 @@ func optimalDefaultCipherSuites() []uint16 {
141144 }
142145 return defaultCipherSuitesWithoutAESNI
143146}
147+
148+ var tlsHandshakeErrorPrefix = []byte ("http: TLS handshake error" )
149+
150+ type logrusErrorWriter struct {}
151+
152+ func (w logrusErrorWriter ) Write (p []byte ) (int , error ) {
153+ if bytes .Contains (p , tlsHandshakeErrorPrefix ) {
154+ return len (p ), nil
155+ }
156+
157+ log .Errorf ("%s" , string (p ))
158+ return len (p ), nil
159+ }
You can’t perform that action at this time.
0 commit comments