Skip to Content
1
Jan 08, 2021 at 12:33 PM

xs-app.json rewrite not working

258 Views Last edit Jan 08, 2021 at 12:51 PM 4 rev

Hello,

I'm deploying an HTML5 app from BAStudio to SCP's Fiori Launchpad using SAP Router (from the wizard, option "Managed by SAP Router") and I'm trying to rewrite a url to a subaccount destination, but it's not working.

My xs-app.json routes are defined like this:

"routes": [
    {
        "source": "^/sap/opu/odata/sap/GBAPP_PRAPPROVAL;mo/(.*)$",
        "target": "/gw/odata/SAP/GBAPP_POAPPROVAL_QAS;v=1/$1",
        "destination": "SCI_SERVICES"
    },
    {
      "source": "^(.*)$",
      "target": "$1",
      "service": "html5-apps-repo-rt",
      "authenticationType": "xsuaa"
    }
  ]

When I open the app in Fiori, the browser console shows the following messages:

And the application shows the following message:

The app is the standard purchase order approval application.

Thanks!

Attachments

app-error.png (17.1 kB)
browser-error.png (48.6 kB)