diff --git a/src/core/server/http/base_path_proxy_server.ts b/src/core/server/http/base_path_proxy_server.ts index f5a9d9324cf9844..731f9afdad6ca2b 100644 --- a/src/core/server/http/base_path_proxy_server.ts +++ b/src/core/server/http/base_path_proxy_server.ts @@ -103,7 +103,7 @@ export class BasePathProxyServer { // Register hapi plugin that adds proxying functionality. It can be configured // through the route configuration object (see { handler: { proxy: ... } }). - await this.server.register([HapiProxy]); + await this.server.register(HapiProxy); if (this.httpConfig.ssl.enabled) { const tlsOptions = serverOptions.tls as TlsOptions; diff --git a/src/core/server/http/cookie_session_storage.ts b/src/core/server/http/cookie_session_storage.ts index 079edcbe91e7867..e057e978facd62b 100644 --- a/src/core/server/http/cookie_session_storage.ts +++ b/src/core/server/http/cookie_session_storage.ts @@ -132,7 +132,7 @@ export async function createCookieSessionStorageFactory( } } - await server.register({ plugin: hapiAuthCookie }); + await server.register(hapiAuthCookie); server.auth.strategy('security-cookie', 'cookie', { cookie: cookieOptions.name, diff --git a/src/core/server/http/http_server.ts b/src/core/server/http/http_server.ts index d97907288dd0ad9..f03e9254c851f56 100644 --- a/src/core/server/http/http_server.ts +++ b/src/core/server/http/http_server.ts @@ -103,7 +103,7 @@ export class HttpServer { const serverOptions = getServerOptions(config); const listenerOptions = getListenerOptions(config); this.server = createServer(serverOptions, listenerOptions); - await this.server.register([HapiStaticFiles]); + await this.server.register(HapiStaticFiles); this.config = config; const basePathService = new BasePath(config.basePath); diff --git a/src/optimize/bundles_route/__tests__/bundles_route.js b/src/optimize/bundles_route/__tests__/bundles_route.js index 00f1e6cad81b6a2..d342af3bba81fd6 100644 --- a/src/optimize/bundles_route/__tests__/bundles_route.js +++ b/src/optimize/bundles_route/__tests__/bundles_route.js @@ -61,7 +61,7 @@ describe('optimizer/bundle route', () => { } = options; const server = new Hapi.Server(); - server.register([Inert]); + server.register(Inert); server.route( createBundlesRoute({