This repository has been archived by the owner on Jun 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
decorator.example.yaml
83 lines (63 loc) · 3.91 KB
/
decorator.example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# default: /<application name>
contextPath: /
decorator:
# https://github.com/navikt/pus-decorator/blob/master/src/main/java/no/nav/pus/decorator/HeaderType.java
headerType: WITH_MENU
# https://github.com/navikt/pus-decorator/blob/master/src/main/java/no/nav/pus/decorator/FooterType.java
footerType: WITHOUT_ALPHABET
# default: no support for authentication and authorization
auth: # any value in the following attributes will activate support for authentication and authorization (additional configuration properties will be required)
enforce: false # if pus-decorator should automatically login users before serving the application. default: true
loginUrl: https://loginservice.nav.no/login # login-endpoint that pus-decorator will redirect to - required when enforce=true
minSecurityLevel: 4 # default: 4 (redirects users with lower security level)
minRemainingSeconds: 1200 # default: 20 min (redirects users with lower remaining login time)
# used to assign url patterns to forward targets.
# files as forward targets are expected to be found under /app and will be decorated.
spa: # default: /* => /index.html
- forwardTarget: /app-1.html
urlPattern: /app1
- forwardTarget: /small/smaller-app.html
urlPattern: /small/app/*
# the example below will create the following proxy-setup:
# | end-user request | proxied request url |
# |----------------------------------------------------------|-------------------------------------------|
# | https://my-decorated-app.com/backend/hello-world | http://my-backend-api/backend/hello-world |
# | https://my-decorated-app.com/pingable | http://pingable-service/pingable |
# | https://my-decorated-app.com/logger/log | http://my-logger/log |
# | https://my-decorated-app.com/example/a/great/example | https://www.example.com/a/great/example |
#
# | proxy-target | ping request url |
# |------------------|----------------------------------------|
# | my-backend-api | http://my-backend-api/backend/api/ping |
# | pingable-service | http://pingable-service/ |
# | my-logger | http://my-logger/api/ping |
# | www.example.com | https://www.example.com/ping |
proxy: # default: /frontendlogger => http://frontendlogger.default is added, but may be overwritten.
- contextPath: /backend
baseUrl: http://my-backend-api
validateOidcToken: true # default: true
minSecurityLevel: 4 # default: 4 (disable with 0/null)
# NB: if a backend either defaults to, or is configured to, perform authentication and/or authorization -
# all request will be denied unless this functionality is activated in the auth-section above
- contextPath: /pingable
baseUrl: http://pingable-service
pingRequestPath: /
- contextPath: /logger
baseUrl: http://my-logger
requestRewrite: REMOVE_CONTEXT_PATH
- contextPath: /example
baseUrl: https://www.example.com
requestRewrite: REMOVE_CONTEXT_PATH
pingRequestPath: /ping
# the example below will create the following redirects:
# | end-user request | redirect |
# |----------------------------------------------------------|---------------------------------------------------|
# | https://tjenester.nav.no/my-app | https://my-app.nav.no |
# | https://tjenester.nav.no/my-app/deep/link?a=b | https://my-app.nav.no/deep/link?a=b |
# | https://my-app.nav.no/other-app | https://tjenester.nav.no/other-app |
# | https://my-app.nav.no/other-app/deep/link?a=b | https://tjenester.nav.no/other-app/deep/link?a=b |
redirect:
- from: /my-app
to: https://my-app.nav.no
- from: /other-app
to: https://tjenester.nav.no/other-app