Add approuter

This commit is contained in:
Uwe Klinger
2021-05-04 15:57:39 +02:00
parent 81f762d7be
commit 09aa318879
15 changed files with 171 additions and 37 deletions

View File

@@ -0,0 +1,19 @@
{
"name": "approuter",
"version": "1.0.0",
"description": "",
"main": "index.js",
"devDependencies": {},
"engines": {
"node": "^12.0.0"
},
"scripts": {
"start": "node node_modules/@sap/approuter/approuter.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@sap/approuter": ">=9.0.2"
}
}

View File

@@ -4,9 +4,8 @@
using from './admin/fiori-service';
using from './browse/fiori-service';
using from './orders/fiori-service';
using from './common';
using from '../db/capire_common';
// only works in case of embedded orders service
// using from './orders/app/orders/fiori-service';

View File

@@ -0,0 +1,28 @@
{
"welcomeFile": "/admin-fiori.html",
"authenticationMethod": "route",
"sessionTimeout": 30,
"logout": {
"logoutEndpoint": "/do/logout",
"logoutPage": "/"
},
"routes": [
{
"source": "^/((admin|browse|orders)/webapp/.*)$",
"target": "$1",
"localDir": ".",
"authenticationType": "xsuaa"
},
{
"source": "^(/[^/]+\\.html(\\?.*)?)$",
"target": "$1",
"localDir": ".",
"authenticationType": "xsuaa"
},
{
"source": "^.*$",
"destination": "srv-api",
"authenticationType": "xsuaa"
}
]
}