Skip to content

Commit

Permalink
Merge pull request #783 from netgroup-polito/mio/frontend-nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
kingmakerbot authored Apr 28, 2022
2 parents 9e28062 + 8c31a10 commit 3038208
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion frontend/nginx.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,32 @@ server {
root /usr/share/nginx/html;
index index.html;
try_files $uri ${SUBROUTE}/index.html;

# Ensure that non-versioned resources are checked
# with upstream before using the cached version.
add_header Cache-Control 'no-cache must-revalidate';
expires 0;
}

location ~ ${SUBROUTE}/favicon.* {
root /usr/share/nginx/html;

# Allow favicons to be cached, although for shorter periods.
add_header Cache-Control 'public';
expires 1M;
}

location ${SUBROUTE}/static {
root /usr/share/nginx/html;

# Allow versioned resources to be cached freely, since a modification
# would also change the file name (i.e. they are immutable).
add_header Cache-Control 'immutable';
expires 1y;
}

location /healthz {
access_log off;
return 200 "healthy\n";
}

}

0 comments on commit 3038208

Please sign in to comment.