Closed ogrammer closed 4 months ago
There is something: https://jooby.io/#router-dynamic-routing. That method allow you to do whatever you want before dispatching to a router.
There is one specialized version that rely on domain (Host header): https://github.com/jooby-project/jooby/blob/3.x/jooby/src/main/java/io/jooby/Router.java#L309
That is great thank you
@jknack Hi, I have just found out that there is a method install(path, supplier<jooby>)
. This seems very useful but it does not seem to support predicates other than path, is there a way to use that with domain?
I have realised that there is a discussions section, sorry for having made an issue instead.
@jknack?
That's right: install
doesn't support routing predicates. Are you sure you need install
and not simply moun
?
Is it possible for a subdomain under the same domain to have different routes? It would be necessary to use the "Host" http header. Making a hidden path for each subdomain page and then writing a handler to modify the request path if "Host" is the subdomain seems like a possible solution, though I'm not sure whether it will work.