Skip to content
Snippets Groups Projects
Verified Commit 0d940fc7 authored by Torsten Grote's avatar Torsten Grote
Browse files

[headless] Set up access manager before starting server

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

https://github.com/tipsy/javalin/commit/ab19ff91b7963313479779636c557770d93a5098
parent 53da1379
No related branches found
No related tags found
No related merge requests found
......@@ -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() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment