approuter changes

This commit is contained in:
Johannes Vogt
2025-03-21 16:52:23 +01:00
parent 7686931f56
commit dca837e595
5 changed files with 62 additions and 10 deletions

1
app/router/bookshop Symbolic link
View File

@@ -0,0 +1 @@
../bookshop/app/vue

1
app/router/orders Symbolic link
View File

@@ -0,0 +1 @@
../orders/app/orders

1
app/router/reviews Symbolic link
View File

@@ -0,0 +1 @@
../reviews/app/vue

View File

@@ -1,10 +1,47 @@
{ {
"welcomeFile": "app/bookshop/index.html",
"routes": [ "routes": [
{ {
"source": "^/(.*)$", "source": "^/app/(.*)$",
"target": "$1", "target": "$1",
"destination": "srv-api", "localDir": ".",
"cacheControl": "no-cache, no-store, must-revalidate"
},
{
"source": "^(.*)$",
"target": "$1",
"localDir": ".",
"cacheControl": "no-cache, no-store, must-revalidate"
},
{
"source": "^/admin/(.*)$",
"target": "/admin/$1",
"destination": "bookstore-api",
"csrfProtection": true "csrfProtection": true
} },
{
"source": "^/browse/(.*)$",
"target": "/browse/$1",
"destination": "bookstore-api",
"csrfProtection": true
},
{
"source": "^/user/(.*)$",
"target": "/user/$1",
"destination": "bookstore-api",
"csrfProtection": true
},
{
"source": "^/odata/v4/orders/(.*)$",
"target": "/odata/v4/orders/$1",
"destination": "orders-api",
"csrfProtection": true
},
{
"source": "^/reviews/(.*)$",
"target": "/reviews/$1",
"destination": "reviews-api",
"csrfProtection": true
}
] ]
} }

View File

@@ -44,12 +44,24 @@ modules:
disk-quota: 256M disk-quota: 256M
memory: 256M memory: 256M
requires: requires:
- name: srv-api - name: orders-api
group: destinations group: destinations
properties: properties:
name: srv-api # must be used in xs-app.json as well name: orders-api
url: ~{srv-url} url: ~{srv-url}
forwardAuthToken: true forwardAuthToken: true
- name: reviews-api
group: destinations
properties:
name: reviews-api
url: ~{srv-url}
forwardAuthToken: true
- name: bookstore-api
group: destinations
properties:
name: bookstore-api
url: ~{srv-url}
forwardAuthToken: true
provides: provides:
- name: app-api - name: app-api
properties: properties: