[headless] Set up access manager before starting server

This became necesary to due an upstream change we missed when bumping
the dependency:

ab19ff91b7
This commit is contained in:
Torsten Grote
2018-10-29 11:20:48 -03:00
parent 53da13794f
commit 0d940fc7d7

View File

@@ -52,7 +52,6 @@ constructor(
.event(SERVER_START_FAILED) {serverStopped() }
.event(SERVER_STOPPED) { serverStopped() }
if (debug) app.enableDebugLogging()
app.start()
app.accessManager { handler, ctx, _ ->
if (ctx.header(AUTHORIZATION) == "Bearer $authToken") {
@@ -102,6 +101,7 @@ constructor(
webSocketController.sessions.remove(session)
}
}
app.start()
}
private fun serverStopped() {