sebdet | d85e24c | 2019-09-04 18:35:26 +0200 | [diff] [blame] | 1 | server { |
| 2 | |
sebdet | 93b4fd4 | 2020-03-25 09:19:34 -0700 | [diff] [blame] | 3 | listen 2443 default ssl; |
sebdet | d85e24c | 2019-09-04 18:35:26 +0200 | [diff] [blame] | 4 | ssl_protocols TLSv1.2; |
ChrisC | 2325efd | 2020-09-11 18:39:23 +0200 | [diff] [blame] | 5 | {{ if .Values.global.aafEnabled }} |
| 6 | ssl_certificate {{.Values.certInitializer.credsPath}}/{{.Values.certInitializer.clamp_pem}}; |
| 7 | ssl_certificate_key {{.Values.certInitializer.credsPath}}/{{.Values.certInitializer.clamp_key}}; |
| 8 | {{ else }} |
sebdet | d85e24c | 2019-09-04 18:35:26 +0200 | [diff] [blame] | 9 | ssl_certificate /etc/ssl/clamp.pem; |
| 10 | ssl_certificate_key /etc/ssl/clamp.key; |
ChrisC | 2325efd | 2020-09-11 18:39:23 +0200 | [diff] [blame] | 11 | {{ end }} |
| 12 | |
sebdet | 6058999 | 2019-10-17 11:13:55 +0200 | [diff] [blame] | 13 | ssl_verify_client optional_no_ca; |
sebdet | d85e24c | 2019-09-04 18:35:26 +0200 | [diff] [blame] | 14 | location /restservices/clds/ { |
| 15 | proxy_pass https://clamp-backend:443; |
sebdet | 6058999 | 2019-10-17 11:13:55 +0200 | [diff] [blame] | 16 | proxy_set_header X-SSL-Cert $ssl_client_escaped_cert; |
sebdet | d85e24c | 2019-09-04 18:35:26 +0200 | [diff] [blame] | 17 | } |
| 18 | |
| 19 | location / { |
| 20 | root /usr/share/nginx/html; |
| 21 | index index.html index.htm; |
| 22 | try_files $uri $uri/ /index.html; |
| 23 | } |
| 24 | |
| 25 | error_page 500 502 503 504 /50x.html; |
| 26 | |
| 27 | location = /50x.html { |
| 28 | root /usr/share/nginx/html; |
| 29 | } |
| 30 | |
| 31 | } |