Skip to content

Commit

Permalink
Add cache-control header to nginx for html files (#1374)
Browse files Browse the repository at this point in the history
Signed-off-by: Jamon Camisso <[email protected]>
  • Loading branch information
jamonation authored Feb 16, 2024
1 parent 2d8cdd1 commit 6829edd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ http {
rewrite ^ /vulnerabilities/index.html break;
}

location ~* /(\index.html)?$ {
add_header Cache-Control "public, max-age=300, stale-while-revalidate=300";
}

# use hugo's built in 404 page for now
error_page 404 /404.html;

Expand Down

0 comments on commit 6829edd

Please sign in to comment.