-
Notifications
You must be signed in to change notification settings - Fork 61
Closed
Copy link
Description
FerrisKey allows configuring a rootPath (e.g., /api) so the entire API can be exposed behind a prefix.
However, several routes are not applying the rootPath, leading to inconsistent behavior and 404 errors in production.
Example of routes missing the prefix:
.route(
"/realms/{realm_name}/users/{user_id}/roles",
get(get_user_roles),
)
.route(
"/realms/{realm_name}/users/{user_id}/credentials",
get(get_user_credentials),
)Whereas otehr routes correctly include the prefix:
.route(
&format!(
"{}/realms/{{realm_name}}/users/{{user_id}}",
state.args.server.root_path
),
get(get_user),
)Impact
When FerrisKey is deployed behind an API Gateway or Ingress using a subpath—e.g.:
Base path: https://ferriskey.bonnal.cloud/api
rootPath = /api
Routes that do not include the rootPath are unreachable and return 404
Reactions are currently unavailable