update nginx.conf
This commit is contained in:
parent
aa8ea1d062
commit
29f79258fb
1 changed files with 19 additions and 21 deletions
|
|
@ -74,31 +74,29 @@ http {
|
|||
text/plain
|
||||
text/xml;
|
||||
|
||||
# Media: images, icons, video, audio, HTC
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
# max-age must be in seconds
|
||||
add_header Cache-Control "max-age=2629746, public";
|
||||
}
|
||||
|
||||
# CSS and Javascript
|
||||
location ~* \.(?:css|js)$ {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "max-age=31556952, public";
|
||||
}
|
||||
|
||||
location / {
|
||||
root /frontend;
|
||||
index index.html;
|
||||
try_files $uri $uri/ $uri/index.html;
|
||||
root /frontend;
|
||||
index index.html;
|
||||
try_files $uri $uri/ $uri/index.html;
|
||||
# Media: images, icons, video, audio, HTC
|
||||
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|mp3|ogg|ogv|webm|htc|woff2|woff|ttf)$ {
|
||||
expires 1M;
|
||||
access_log off;
|
||||
# max-age must be in seconds
|
||||
add_header Cache-Control "max-age=2629746, public";
|
||||
}
|
||||
# CSS and Javascript
|
||||
location ~* \.(?:css|js)$ {
|
||||
expires 1y;
|
||||
access_log off;
|
||||
add_header Cache-Control "max-age=31556952, public";
|
||||
}
|
||||
}
|
||||
|
||||
location = /health {
|
||||
access_log off;
|
||||
add_header 'Content-Type' 'application/json';
|
||||
return 200 '{"status":"UP"}';
|
||||
access_log off;
|
||||
add_header 'Content-Type' 'application/json';
|
||||
return 200 '{"status":"UP"}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue