Commit 22eed910 authored by akwizgran's avatar akwizgran

Merge branch 'javalin-access-manager' into 'master'

[headless] Set up access manager before starting server

See merge request !966
parents fcb88ed5 0d940fc7
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment