-
Notifications
You must be signed in to change notification settings - Fork 940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add path prefixes for routers #1015
base: main
Are you sure you want to change the base?
Conversation
Implements path prefixes for both public and admin routers so hanko can be hosted also on a subpath.
I think you could add another test run to the e2e tests with a path prefix configured, but that seem a little overkill. |
The Also when the statusHandler in the public router is affected by the path prefix, then the statusHandler from the admin router should also be affected (for consistency). |
I guess In this case - because of how the endpoints in Hanko are named you are running the risk of a naming collision on the endpoints (and the config for the load balancer becomes messy). Hence I would place the public routes e.g. under a common path like But the For the admin API it could also make sense to have a path-prefix but it's functionality will be limited. However I would keep it separate from the public one? |
Having another prefix only for the The admin API path-prefix should be kept separated from the public one. |
@FerdinandvHagen I thought a little bit more about this, maybe we can add a new config option (e.g. |
Sounds also fine with me - even though the config might get more and more complicated. |
Description
Implements path prefixes for both public and admin routers so hanko can be hosted also on a subpath.
E.g. AWS Application Load Balancers do not offer the option to rewrite the path - so hosting Hanko would always require an additional system (e.g. nginx) if hosted on a subpath on a shared domain.
With these small changes it's possible to host hanko on a subpath.
Tests
Please let me know if there is a proper way to test this (that makes sense).