diff --git a/config/nginx.conf b/config/nginx.conf index c373612f..4204dc08 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -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"}'; } } }