this path directive of akka http matches /hello
lazy val userRoutes: Route = cors() {
path(Segment) { p => ... }
how can I match both /hello
and /hello/
(optional end slash)?
After reading the doc https://doc.akka.io/docs/akka-http/current/routing-dsl/directives/path-directives/index.html#pathdirectives I've tried as follows, but it does not compile:
lazy val userRoutes: Route = cors() {
rawPathPrefix(Slash ~ Segment ~ pathEndOrSingleSlash) { p => ... }