-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdefault.conf.template
More file actions
73 lines (59 loc) · 1.86 KB
/
default.conf.template
File metadata and controls
73 lines (59 loc) · 1.86 KB
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
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen ${LISTEN_PORT} ssl http2;
listen [::]:${LISTEN_PORT} ssl http2;
server_name _;
ssl_certificate ${SSL_CERT_PATH};
ssl_certificate_key ${SSL_CERT_KEY_PATH};
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
keepalive_timeout 65;
if ($scheme = http) {
return 301 https://$host$request_uri;
}
add_header Strict-Transport-Security "max-age=31536000" always;
add_header X-Content-Type-Options nosniff;
add_header X-Frame-Options SAMEORIGIN;
add_header X-XSS-Protection "1; mode=block";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_cache_bypass $http_upgrade;
proxy_redirect off;
client_max_body_size 20m;
location /davinci/ {
rewrite ^/davinci/(.*)$ /$1 break;
proxy_pass http://${DAVINCI_UPSTREAM};
}
location /ping-am/ {
proxy_pass http://${OIDC_UPSTREAM};
}
location /ping-one/ {
proxy_pass http://${OIDC_UPSTREAM};
}
location /protect/ {
rewrite ^/protect/(.*)$ /$1 break;
proxy_pass http://${PROTECT_UPSTREAM};
}
location /device-client/ {
rewrite ^/device-client/(.*)$ /$1 break;
proxy_pass http://${DEVICE_UPSTREAM};
}
location /mock-api/ {
rewrite ^/mock-api/(.*)$ /$1 break;
proxy_pass http://${MOCK_API_UPSTREAM};
}
# Fallback to oidc app for everything else
location / {
proxy_pass http://${OIDC_UPSTREAM};
}
}