From b54a7d4fccf446bde7e93ea82cac11103b5d0ee0 Mon Sep 17 00:00:00 2001 From: Hayden <64056131+hay-kot@users.noreply.github.com> Date: Thu, 1 Jul 2021 15:59:39 -0800 Subject: [PATCH] Refactor/class based gunicorn conf (#608) * use class for conf * format caddy file Co-authored-by: hay-kot --- Caddyfile | 53 ++++++++++++++++++++++++++--------------------------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/Caddyfile b/Caddyfile index 35d7767249e8..9e08f53c869b 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,35 +1,34 @@ { auto_https off - admin off + admin off } :80 { - @proxied path /api/* /docs /openapi.json + @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 - } + @static { + file + path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.webp + } - handle @proxied { - uri strip_suffix / - reverse_proxy http://127.0.0.1:9000 - } + encode gzip zstd - handle { - header @static Cache-Control max-age=31536000 - root * /app/dist - try_files {path}.html {path} / - file_server - } -} \ No newline at end of file + # 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 + } +}