Configure advertised port using h3 server option

Co-authored-by: Romain <rtribotte@users.noreply.github.com>
This commit is contained in:
Kevin Pollet 2022-02-15 16:04:09 +01:00 committed by GitHub
parent 9297055ad8
commit aaf5aa4506
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 33 deletions

View file

@ -147,19 +147,19 @@ func NewTCPEntryPoint(ctx context.Context, configuration *static.EntryPoint, hos
httpServer, err := createHTTPServer(ctx, listener, configuration, true, reqDecorator)
if err != nil {
return nil, fmt.Errorf("error preparing httpServer: %w", err)
return nil, fmt.Errorf("error preparing http server: %w", err)
}
rt.HTTPForwarder(httpServer.Forwarder)
httpsServer, err := createHTTPServer(ctx, listener, configuration, false, reqDecorator)
if err != nil {
return nil, fmt.Errorf("error preparing httpsServer: %w", err)
return nil, fmt.Errorf("error preparing https server: %w", err)
}
h3server, err := newHTTP3Server(ctx, configuration, httpsServer)
h3Server, err := newHTTP3Server(ctx, configuration, httpsServer)
if err != nil {
return nil, err
return nil, fmt.Errorf("error preparing http3 server: %w", err)
}
rt.HTTPSForwarder(httpsServer.Forwarder)
@ -174,7 +174,7 @@ func NewTCPEntryPoint(ctx context.Context, configuration *static.EntryPoint, hos
tracker: tracker,
httpServer: httpServer,
httpsServer: httpsServer,
http3Server: h3server,
http3Server: h3Server,
}, nil
}