From 9a71b6ecdf1543feb71b07e5deca7fa4edb5701b Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 28 Jul 2021 22:01:37 +0200 Subject: [PATCH] Create caddy.txt --- mealie/rootfs/caddy.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 mealie/rootfs/caddy.txt diff --git a/mealie/rootfs/caddy.txt b/mealie/rootfs/caddy.txt new file mode 100644 index 000000000..b60e1c971 --- /dev/null +++ b/mealie/rootfs/caddy.txt @@ -0,0 +1,33 @@ + +:8099 { + @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 + header X-Frame-Options "SAMEORIGIN" + root * /app/data/recipes/ + file_server + } + + handle @proxied { + uri strip_suffix / + header X-Frame-Options "SAMEORIGIN" + reverse_proxy http://127.0.0.1:9000 + } + + handle { + header @static Cache-Control max-age=31536000 + root * /app/dist + header X-Frame-Options "SAMEORIGIN" + try_files {path}.html {path} / + file_server + } +}