I have some Routes that are admin specific and some that are not.
I have the below in my code:
val route = pathPrefixTest("admin") { statusRoute ~ statsRoute } ~ securedRoutes
The securedRoutes are public facing and do additional logic like checking a user is logged in, and rejects them if they are not, whereas the admin urls are internal LDAP protected, and hence do not need these checks.
The problem I have, is when someone types "/admin/mispelt_url", it does not meet the admin routes, and tries the secure ones. At this point, it tries to check if the user is logged in, and returns an error that they need to sign in.
What I'd like is:
val route = pathPrefixTest("admin") { statusRoute ~ statsRoute } ~ **pathPrefixTest("NOT admin")** {securedRoutes}
Is there a path matching mechanism for this?
"admin".!
? - jrudolph