@@ -110,11 +110,6 @@ func main() {
110
110
}
111
111
c .NextProtos = []string {"http/1.1" }
112
112
}
113
- webhookServerOptions := webhook.Options {
114
- TLSOpts : []func (config * tls.Config ){disableHTTP2 },
115
- Port : 9443 ,
116
- }
117
- webhookServer := webhook .NewServer (webhookServerOptions )
118
113
119
114
metricsServerOptions := metricsserver.Options {
120
115
BindAddress : metricsAddr ,
@@ -124,7 +119,6 @@ func main() {
124
119
mgr , err := ctrl .NewManager (ctrl .GetConfigOrDie (), ctrl.Options {
125
120
Scheme : scheme ,
126
121
Metrics : metricsServerOptions ,
127
- WebhookServer : webhookServer ,
128
122
HealthProbeBindAddress : probeAddr ,
129
123
LeaderElection : enableLeaderElection ,
130
124
LeaderElectionID : "2b63967d.openshift.io" ,
@@ -153,6 +147,12 @@ func main() {
153
147
setupLog .Error (err , "unable to create webhook" , "webhook" , "ArgoCD" )
154
148
os .Exit (1 )
155
149
}
150
+
151
+ // disable http/2 to mitigate CVE-2023-44487 & CVE-2023-39325
152
+ server , ok := mgr .GetWebhookServer ().(* webhook.DefaultServer )
153
+ if ok {
154
+ server .Options .TLSOpts = append (server .Options .TLSOpts , disableHTTP2 )
155
+ }
156
156
}
157
157
158
158
if err = (& controllers.ReconcileGitopsService {
0 commit comments