File tree 1 file changed +17
-1
lines changed
components/ws-proxy/pkg/proxy 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 5
5
package proxy
6
6
7
7
import (
8
+ "bytes"
8
9
"crypto/tls"
10
+ stdlog "log"
9
11
"net/http"
10
12
"os"
11
13
"path/filepath"
12
14
13
- "github.com/gitpod-io/golang-crypto/ssh"
14
15
"github.com/gorilla/mux"
15
16
"github.com/klauspost/cpuid/v2"
16
17
17
18
"github.com/gitpod-io/gitpod/common-go/log"
19
+ "github.com/gitpod-io/golang-crypto/ssh"
18
20
)
19
21
20
22
// WorkspaceProxy is the entity which forwards all inbound requests to the relevant workspace pods.
@@ -64,6 +66,7 @@ func (p *WorkspaceProxy) MustServe() {
64
66
PreferServerCipherSuites : true ,
65
67
NextProtos : []string {"h2" , "http/1.1" },
66
68
},
69
+ ErrorLog : stdlog .New (logrusErrorWriter {}, "" , 0 ),
67
70
}
68
71
69
72
var (
@@ -141,3 +144,16 @@ func optimalDefaultCipherSuites() []uint16 {
141
144
}
142
145
return defaultCipherSuitesWithoutAESNI
143
146
}
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