handlers: Avoid initializing a struct in each handler call (#11217)

This commit is contained in:
Anis Elleuch
2021-01-04 18:54:22 +01:00
committed by GitHub
parent a4383051d9
commit cb7fc99368
4 changed files with 334 additions and 457 deletions

View File

@@ -271,7 +271,7 @@ func StartGateway(ctx *cli.Context, gw Gateway) {
registerAPIRouter(router)
// Use all the middlewares
router.Use(registerMiddlewares)
router.Use(globalHandlers...)
var getCert certs.GetCertificateFunc
if globalTLSCerts != nil {