fix(api): allow HTTP/1.1 for grpc-web (#5376)

Handles grpc-web on HTTP/1.1 with H2C for HTTP/2, but does not enforce it.
This commit is contained in:
Livio Spring
2023-03-08 19:33:43 +01:00
committed by GitHub
parent c8f206c438
commit 8cbde57047
2 changed files with 35 additions and 48 deletions

View File

@@ -223,7 +223,7 @@ func startAPIs(
logging.Warn("access logs are currently in beta")
}
accessInterceptor := middleware.NewAccessInterceptor(accessSvc, config.Quotas.Access)
apis := api.New(config.Port, router, queries, verifier, config.InternalAuthZ, config.ExternalSecure, tlsConfig, config.HTTP2HostHeader, config.HTTP1HostHeader, accessSvc)
apis := api.New(config.Port, router, queries, verifier, config.InternalAuthZ, tlsConfig, config.HTTP2HostHeader, config.HTTP1HostHeader, accessSvc)
authRepo, err := auth_es.Start(ctx, config.Auth, config.SystemDefaults, commands, queries, dbClient, eventstore, keys.OIDC, keys.User)
if err != nil {
return fmt.Errorf("error starting auth repo: %w", err)