From b88d17e3262c25125645e99677a814ec89fafbdb Mon Sep 17 00:00:00 2001 From: Devin Cowan Date: Tue, 5 Nov 2024 09:10:09 -0500 Subject: [PATCH] Refactor Caddy configuration to add asset routing for woff2|tiff|md --- app/frontend/caddy.docker.json | 89 +++++++++++++++------------------- 1 file changed, 38 insertions(+), 51 deletions(-) diff --git a/app/frontend/caddy.docker.json b/app/frontend/caddy.docker.json index 403ffad4..c5752c3f 100644 --- a/app/frontend/caddy.docker.json +++ b/app/frontend/caddy.docker.json @@ -1,58 +1,45 @@ { - "apps": - { - "http": - { - "servers": + "apps": { + "http": { + "servers": { + "web": { + "automatic_https": { + "disable": true + }, + "listen": [":8080"], + "routes": [ { - "web": + "handle": [ { - "automatic_https": - { - "disable": true - }, - "listen": - [ - ":8080" - ], - "routes": - [ - { - "handle": - [ - { - "handler": "file_server", - "root": "/srv" - } - ], - "match": - [ - { - "path_regexp": - { - "name": "asset", - "pattern": "\\.(br|css|gz|ico|jpg|js|mp3|mp4|png|svg)$" - } - } - ], - "terminal": true - }, - { - "handle": - [ - { - "handler": "rewrite", - "uri": "/index.html" - }, - { - "handler": "file_server", - "root": "/srv" - } - ] - } - ] + "handler": "file_server", + "root": "/srv" } + ], + "match": [ + { + "path_regexp": { + "name": "asset", + "pattern": "\\.(br|css|gz|ico|jpg|js|mp3|mp4|png|svg|woff2|tiff|md)$" + } + } + ], + "terminal": true + }, + { + "handle": [ + { + "handler": "rewrite", + "uri": "/index.html" + }, + { + "handler": "file_server", + "root": "/srv" + } + ] } + ] } + } } -} \ No newline at end of file + } +}