Skip to Content
Jan 09, 2022 at 10:40 PM

CAP CDS (node.js) url rewrites



I am having an issue with a CAP CDS (node.js) application where the server redirects the urls. It seems the standard server is picking up any url part which leads with the service name and directs it straight to the service.

I have a service named "something", and entity in it which is named "somecontainer" which has an association named "somethingImportant" for example, I want to be able to do this:


But when I do that, the server response with a 308-redirect to /somethingImportant (which does not exist).

I can trace it to coming from here and that the "lastIndexOf" search is looking for the service name without a closing "/" (so the attempted service url of "/something" matches with the navigation "/somethingImportant"), but I cannot see how to avoid it?


Thanks in advance!



redirect.jpg (151.4 kB)