Skip to content

Commit 80b770b

Browse files
committed
Revert "Disable http/2 on webhook server"
This reverts commit 6cff7f8. Previous changes work as expected.
1 parent 6cff7f8 commit 80b770b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

main.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ func main() {
110110
}
111111
c.NextProtos = []string{"http/1.1"}
112112
}
113+
webhookServerOptions := webhook.Options{
114+
TLSOpts: []func(config *tls.Config){disableHTTP2},
115+
Port: 9443,
116+
}
117+
webhookServer := webhook.NewServer(webhookServerOptions)
113118

114119
metricsServerOptions := metricsserver.Options{
115120
BindAddress: metricsAddr,
@@ -119,6 +124,7 @@ func main() {
119124
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
120125
Scheme: scheme,
121126
Metrics: metricsServerOptions,
127+
WebhookServer: webhookServer,
122128
HealthProbeBindAddress: probeAddr,
123129
LeaderElection: enableLeaderElection,
124130
LeaderElectionID: "2b63967d.openshift.io",
@@ -147,12 +153,6 @@ func main() {
147153
setupLog.Error(err, "unable to create webhook", "webhook", "ArgoCD")
148154
os.Exit(1)
149155
}
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-
}
156156
}
157157

158158
if err = (&controllers.ReconcileGitopsService{

0 commit comments

Comments
 (0)