Skip to content

Commit

Permalink
Update server/server.go
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Crenshaw <[email protected]>
Signed-off-by: Alexandre Gaudreault <[email protected]>
  • Loading branch information
agaudreault and crenshaw-dev authored Nov 1, 2024
1 parent aa22429 commit 47832d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,10 @@ func (a *ArgoCDServer) Run(ctx context.Context, listeners *Listeners) {
// If not matched, we assume that its TLS.
tlsl := tcpm.Match(cmux.Any())
tlsConfig := tls.Config{
// Prefer http/1.1 for HTTPS and HTTP2 for grpc
// Advertise that we support both http/1.1 and http2 for application level communication.
// By putting http/1.1 first, we ensure that HTTPS clients will use http/1.1, which is the only
// protocol our server supports for HTTPS clients. By including h2 in the list, we ensure that
// gRPC clients know we support http2 for their communication.
NextProtos: []string{"http/1.1", "h2"},
}
tlsConfig.GetCertificate = func(info *tls.ClientHelloInfo) (*tls.Certificate, error) {
Expand Down

0 comments on commit 47832d7

Please sign in to comment.