diff --git a/core/src/main/scala/org/thp/scalligraph/ScalligraphApplication.scala b/core/src/main/scala/org/thp/scalligraph/ScalligraphApplication.scala index 3172bb39..210fd739 100644 --- a/core/src/main/scala/org/thp/scalligraph/ScalligraphApplication.scala +++ b/core/src/main/scala/org/thp/scalligraph/ScalligraphApplication.scala @@ -175,6 +175,7 @@ class ScalligraphApplicationImpl(val context: Context) val routers: LazyMutableSeq[Router] = LazyMutableSeq[Router] override lazy val router: Router = initCheck { + val prefix = httpConfiguration.context routers() .reduceOption(_ orElse _) .getOrElse(Router.empty) @@ -183,6 +184,7 @@ class ScalligraphApplicationImpl(val context: Context) case _ => authAction } } + .withPrefix(prefix) } lazy val defaultAction: ActionFunction[Request, AuthenticatedRequest] = new ActionFunction[Request, AuthenticatedRequest] {