Skip to Content
0
6 days ago

xs-app.json File Configuration CAP and FIORI elements

97 Views Last edit 5 days ago 5 rev

Hi,

We created a BTP application with Fiori elements, but, when we deployed the application only be able to open the index screen. If we navigate to the others screen on the app always get a 404 error. This does not happen if we run the app locally.

This is our xs-app file:

{
  "welcomeFile": "index.html",
  "authenticationMethod": "route",
  "routes": [
    {
      "source": "^/app/(.*)$",
      "authenticationType": "xsuaa",
      "scope": "$XSAPPNAME.Viewer",
      "destination": "srv-api",
      "cacheControl": "no-cache, no-store, must-revalidate"
    },
    {
      "source": "^/customer-maintenace/(.*)$",
      "target": "/customer-maintenace/webapp/$1",
      "authenticationType": "xsuaa",
      "scope": "$XSAPPNAME.Viewer",
      "destination": "ui5"
    },
    {
      "source": "^/(.*)$",
      "authenticationType": "xsuaa",
      "scope": "$XSAPPNAME.Viewer",
      "localDir": "."
    }
  ]
}

Also, we notice when we create a new screen the template creates a new xs-app file, this is correct?

Thanks.