-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathnginx.upstream.conf
38 lines (34 loc) · 1.09 KB
/
nginx.upstream.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
server {
listen 80 default_server deferred;
listen [::]:80 default_server deferred;
access_log /etc/nginx/log/access.log;
error_log /etc/nginx/log/error.log info;
root /app;
try_files $uri /index.html;
location ^~ /static/ {
gzip on;
gzip_vary on;
gzip_static on;
gzip_comp_level 2;
gzip_types
text/plain
text/css
text/js
text/xml
text/javascript
application/javascript
application/x-javascript
application/json
application/xml
application/rss+xml
image/svg+xml;
expires max;
add_header Cache-Control public;
}
# This is to make sure that any updates to the service worker are detected
# See https://medium.com/@kellyrmilligan/adjusting-cache-settings-for-create-react-apps-service-worker-40fb0d060635
# and https://developers.google.com/web/fundamentals/primers/service-workers/lifecycle#avoid_changing_the_url_of_your_service_worker_script
location ~* ^/(service-worker.js|index.html)$ {
add_header Cache-Control "max-age=0, no-cache, no-store, must-revalidate";
}
}