diff --git a/mealie/rootfs/caddy.txt b/mealie/rootfs/caddy.txt new file mode 100644 index 000000000..49bef3110 --- /dev/null +++ b/mealie/rootfs/caddy.txt @@ -0,0 +1,29 @@ +:443 { + @proxied path /api/* /docs /openapi.json + + @static { + file + path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp + } + + encode gzip zstd + + # Handles Recipe Images / Assets + handle_path /api/media/recipes/* { + header @static Cache-Control max-age=31536000 + root * /app/data/recipes/ + file_server + } + + handle @proxied { + uri strip_suffix / + reverse_proxy http://127.0.0.1:9000 + } + + handle { + header @static Cache-Control max-age=31536000 + root * /app/dist + try_files {path}.html {path} / + file_server + } +}