503fe5cb2e
* fix image write/caching * Caddyfile Caching header * more aggressive caching Co-authored-by: hay-kot <hay-kot@pm.me>
34 lines
No EOL
621 B
Caddyfile
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
|
|
}
|
|
} |