I have an Azure CDN - Microsoft CDN (classic) that serves multiple single-page apps via different endpoints.
I am trying to add a backend API to one of the endpoints and would like to access it in SPA using /api route.
I have set up the origins like this:

<my-endpoint>.azureedge.net perfectly loads frontend-spa (the default origin group).
I want to route:
<my-endpoint>.azureedge.net/api/resources/my-resource
to this (without /api/):
<my-backend-api>.azurewebsites.net/resources/resource
Here is the rule I have set up to do that:

But the rule actually redirects to the home page of my backend:
<my-backend-api>.azurewebsites.net/
It discards anything after /api in the original route even though I have set Preserve unmatched path to Yes.
What have I missed in my rule/setup?
Found the issue: as it turned out, we had another rule which would override the
Preserve unmatched pathof this one.Didn't know that even if you override the origin, other rules are still applied to the request.
The other rule was like this:
Updated to this: