aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/portal-ng/components/portal-ng-ui/resources/default.conf
blob: d448e278d5ea870ca33b545f1856136be0475b6e (plain)
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
resolver {{ .Values.env.CLUSTER_NAMESERVER_IP }};
server {
    listen       {{ .Values.env.NGINX_PORT }};
    location / {
        root /usr/share/nginx/html;
        index index.html;
        try_files $uri $uri/ /index.html =404;
    }
    location /api/ {
        set                 $upstream           {{ .Values.env.BFF_URL }};
        rewrite             /api/(.*) /$1 break;
        add_header          Access-Control-Allow-Origin *;
        proxy_pass                              $upstream/$1$is_args$args;
        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-Host    $host;
        proxy_set_header    X-Forwarded-Server  $host;
        proxy_set_header    X-Forwarded-Port    $server_port;
        proxy_set_header    X-Forwarded-Proto   $scheme;
        proxy_http_version 1.1;
    }
    location /auth/ {
            set                 $upstream           {{ .Values.env.KEYCLOAK_INTERNAL_URL }};
            rewrite             /auth/(.*) /$1 break;
            add_header          Access-Control-Allow-Origin *;
            proxy_pass                              $upstream/$1$is_args$args;
            proxy_http_version                     1.1;
            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-Host   $host;
            proxy_set_header    X-Forwarded-Server $host;
            proxy_set_header    X-Forwarded-Port   $server_port;
            proxy_set_header    X-Forwarded-Proto  $scheme;
    }
}
##
# Gzip Settings
##
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_min_length 1100;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;