Skip to content

Commit

Permalink
Merge branch 'release/1.0.25'
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed Jun 15, 2020
2 parents 3b3e2f5 + 95e985c commit 7485349
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Nginx-Craft Changelog

## 1.0.25 - 2020.06.15
### Changed
* Route any 404s for `expires.conf` matches back through Craft for handling

## 1.0.24 - 2020.05.14
### Added
* Added `always` to all of the added headers in `security.conf` so that they are added regardless of response code
Expand Down
6 changes: 6 additions & 0 deletions nginx-partials/expires.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp3|mp4|ogg|ogv|webm|htc|w
etag off;
expires 1M;
access_log off;
# Route any 404s back through Craft
try_files $uri /index.php?$query_string;
# max-age=2592000 = 1 month in seconds, stale-while-revalidate=86400 = 1 day in seconds
add_header Cache-Control "public, max-age=2592000, must-revalidate, stale-while-revalidate=86400";
}
Expand All @@ -28,6 +30,8 @@ location ~* \.(?:css|js)$ {
etag off;
expires 1y;
access_log off;
# Route any 404s back through Craft
try_files $uri /index.php?$query_string;
# max-age=31556952 = 1 year in seconds
add_header Cache-Control "public, max-age=31556952, immutable";
}
Expand All @@ -38,6 +42,8 @@ location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ {
add_header "Access-Control-Allow-Origin" "*";
expires 1M;
access_log off;
# Route any 404s back through Craft
try_files $uri /index.php?$query_string;
# max-age=2592000 = 1 month in seconds, stale-while-revalidate=86400 = 1 day in seconds
add_header Cache-Control "public, max-age=2592000, must-revalidate, stale-while-revalidate=86400";
}

0 comments on commit 7485349

Please sign in to comment.