bug/bug-fixes (#424)

* fix image write/caching

* Caddyfile Caching header

* more aggressive caching

Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
Hayden
2021-05-23 15:05:39 -08:00
committed by GitHub
parent eb3d56936e
commit 503fe5cb2e
11 changed files with 44 additions and 34 deletions

View File

@@ -5,12 +5,18 @@
:80 {
@proxied path /api/* /docs /openapi.json
@static {
file
path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp
}
encode gzip zstd
uri strip_suffix /
# Handles Recipe Images / Assets
handle_path /api/media/recipes/* {
header @static Cache-Control max-age=31536000
root * /app/data/recipes/
file_server
}
@@ -20,6 +26,7 @@
}
handle {
header @static Cache-Control max-age=31536000
root * /app/dist
try_files {path}.html {path} /index.html
file_server