I’m running Kong on a Linux installation, and some of the APIs I manage have duplicate paths like/info, /health, /users, /groups, etc.
To get around this I tried using deck file namespace, which adds a unique prefix (workspace + app name) to all my routes, and a pre-function to strip that path out.
For example if I have an application named ‘security’ in the ‘inf’ workspace, its paths ends up looking like this: /inf/security/logon, /inf/security/users, /inf/security/groups.
The paths look like ~/inf/security/users$, and the upstream is /users, which works. by just using deck commands from start to finish - I generate the api spec programmatically, then I use openapi2kong and namespaceto convert to a kong spec and add the prefixes and pre-function plugin.
However, I also need to log the request body, which also uses a pre-function, and conflicts with the pre-function deck’s namespace command generates.
What’s the right way to strip out inf/security prefix so that all of my upstreams look like /users, /groups, etc. without using a pre-function? I feel like I’ve missed a basic concept.