Stream: hapi
Topic: Multi-service support
Mike Gabrin (Jun 26 2018 at 21:14):
Hi all,
We are currently using the HAPI multi-tenancy support capabilities in HAPI server, and are looking to support multiple EMR services (Cerner, Epic, Allscripts, etc.) within each of these tenants. We would like our URL structure to look something like this:
/<tenant>/<service>/<resource>?<query_params>
as opposed to this:
/<tenant>/<resource>?<query_params>
where the point on entry for the hapi server is /<tenant>
in both cases. Is this something that a custom server addressing strategy could accomplish, or is there another approach that anybody has used to solve a problem like this?
Thanks for your input!!
James Agnew (Jun 26 2018 at 21:44):
I don't think a server address strategy would be able to handle this unfortunately. To be honest, the only mechanism I can think of (and it's kind of clunky) would be to use a servlet filter outside the servlet to capture the service identifier, store it in an attribute in the request, then to rewrite the request URI to strip the service identifier.
Mike Gabrin (Jun 27 2018 at 11:59):
Ok, that is the route that we were beginning to venture down, but I wanted to check before we got too deep in to that work. Thank you for the help!!
Last updated: Apr 12 2022 at 19:14 UTC