-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathfrontend-proxy.conf
45 lines (37 loc) · 1.02 KB
/
frontend-proxy.conf
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
server {
listen 80 default_server;
gzip on;
gzip_min_length 1000;
gzip_types text/plain application/json application/xml application/atom+xml text/javascript application/x-javascript application/javascript text/css;
# clickjacking protection
add_header X-Frame-Options "SAMEORIGIN";
# set nameserver manually to force DNS refresh for proxy URLs
resolver 8.8.8.8;
# set API domain
set $backend https://${API_URL};
if ( $http_x_forwarded_proto != 'https' ) {
return 301 https://$host$request_uri;
}
location / {
root /usr/share/nginx/html;
index index.html;
try_files $uri /index.html;
}
location /api {
proxy_pass $backend;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /version {
return 200;
add_header Bundle-Version xyz;
add_header Content-Type application/json;
}
}
# Health check
server {
listen 8080 default;
location / {
return 200;
}
}