cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

CAP CDS (node.js) url rewrites

carlonnheim
Participant
1,288

Hi,

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:

https://.../something/somecontainer('abc')/somethingImportant

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!

//Carl

Accepted Solutions (1)

Accepted Solutions (1)

chgeo
Product and Topic Expert
Product and Topic Expert
0 Likes

This is fixed with @sap/cds 5.8.0.

carlonnheim
Participant
0 Likes

Perfect, thanks Christian!

Answers (0)