forked from deriv-com/deriv-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.conf
38 lines (29 loc) · 952 Bytes
/
default.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;
server_name _;
root /usr/share/nginx/html;
index index.html index.htm;
# Cache the static content for 2 hours
add_header Cache-Control "public, max-age=7200, s-maxage=600, must-revalidate";
add_header X-Frame-Options SAMEORIGIN always;
charset UTF-8;
error_page 404 /custom404.html;
location @custom_error_503 {
return 503;
}
location ~* \.(html)$ {
add_header Cache-Control "public, max-age=0, must-revalidate";
}
location /media {
add_header Cache-Control "public, max-age=0, must-revalidate";
}
location /public/images {
add_header Cache-Control "public, max-age=0, must-revalidate";
}
location ~ (manifest\.json|robots\.txt|service-worker\.js|sitemap\.xml|favicon\.ico)$ {
add_header Cache-Control "public, max-age=0, must-revalidate";
}
location / {
try_files $uri /index.html;
}
}