-
Notifications
You must be signed in to change notification settings - Fork 88
/
Copy pathnginx.conf
53 lines (52 loc) · 1.41 KB
/
nginx.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
46
47
48
49
50
51
52
53
upstream api-waftengine-com {
server 127.0.0.1:5050 fail_timeout=0;
}
server {
# root /var/www/waftengine/client/dist;
server_name demo.waftengine.com;
location / {
expires 100d;
add_header Cache-Control "public, no-transform";
root /var/www/waftengine/client/dist;
try_files $uri /index.html;
}
# Do not cache sw.js, required for offline-first updates.
location /sw.js {
root /var/www/waftengine/client/dist;
add_header Cache-Control "no-cache";
proxy_cache_bypass $http_pragma;
proxy_cache_revalidate on;
expires off;
access_log off;
}
location /api {
proxy_pass http://api-waftengine-com;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /verify {
proxy_pass http://api-waftengine-com;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /public {
expires 100d;
add_header Cache-Control "public, no-transform";
root /var/www/waftengine/server;
try_files $uri $uri/ @fallback;
}
location @fallback {
proxy_pass http://api-waftengine-com;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}