diff --git a/fiori/app/xs-app.json b/fiori/app/xs-app.json new file mode 100644 index 00000000..45d5ebb2 --- /dev/null +++ b/fiori/app/xs-app.json @@ -0,0 +1,24 @@ +{ + "authenticationMethod": "route", + "routes": [ + { + "source": "^/-/cds/.*", + "destination": "mtx-api", + "authenticationType": "none" + }, + { + "source": "^/app/(.*)$", + "target": "$1", + "localDir": ".", + "authenticationType": "xsuaa", + "cacheControl": "no-cache, no-store, must-revalidate" + }, + { + "source": "^/(.*)$", + "target": "$1", + "destination": "srv-api", + "authenticationType": "xsuaa", + "csrfProtection": true + } + ] +} \ No newline at end of file diff --git a/fiori/mta.yaml b/fiori/mta.yaml index e266b0e9..0833306a 100644 --- a/fiori/mta.yaml +++ b/fiori/mta.yaml @@ -1,4 +1,3 @@ ---- _schema-version: '3.1' ID: capire.fiori version: 1.0.0 diff --git a/fiori/package.json b/fiori/package.json index 5e30b90a..22cbd3cb 100644 --- a/fiori/package.json +++ b/fiori/package.json @@ -43,7 +43,7 @@ } }, "db": { - "kind": "sql" + "kind": "sql-mt" }, "db-ext": { "[development]": { @@ -57,7 +57,9 @@ "toggles": true, "extensibility": true, "cds.xt.ExtensibilityService": { - "element-prefix": ["x_"], + "element-prefix": [ + "x_" + ], "extension-allowlist": [ { "for": [ diff --git a/fiori/server.js b/fiori/server.js index 41112772..03c65e49 100644 --- a/fiori/server.js +++ b/fiori/server.js @@ -10,6 +10,6 @@ module.exports = require('@capire/bookstore/server.js') // For didactic reasons in capire, run below services embedded // TODO find a better way to switch this if (cds.requires.multitenancy) { - cds.requires.OrdersService = null - cds.requires.ReviewsService = null + delete cds.env.requires.OrdersService + delete cds.env.requires.ReviewsService } \ No newline at end of file