mealie/Caddyfile
Hayden 503fe5cb2e
bug/bug-fixes (#424)
* fix image write/caching

* Caddyfile Caching header

* more aggressive caching

Co-authored-by: hay-kot <hay-kot@pm.me>
2021-05-23 15:05:39 -08:00

34 lines
No EOL
621 B
Caddyfile

{
auto_https off
admin off
}
: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
}
handle @proxied {
reverse_proxy http://127.0.0.1:9000
}
handle {
header @static Cache-Control max-age=31536000
root * /app/dist
try_files {path}.html {path} /index.html
file_server
}
}