From e76131fabbcd124c6c046ce8b3bdce6e5df3fe47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20M=C3=BCller=20=28ChaoticByte=29?= Date: Thu, 1 Feb 2024 18:47:18 +0100 Subject: [PATCH] Changed the example Caddyfile to be more useful --- Caddyfile_example | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Caddyfile_example b/Caddyfile_example index 275fb00..c87d1be 100644 --- a/Caddyfile_example +++ b/Caddyfile_example @@ -2,9 +2,13 @@ admin off } -:8001 { +https://example.org { root * ./static - respond /settings.json "\{\"api_url\": \"http://{http.request.host}:8000\"\}" + route /api/* { + uri strip_prefix /api + reverse_proxy localhost:8000 + } + respond /settings.json "\{\"api_url\": \"https://{http.request.hostport}/api\"\}" file_server header { X-Frame-Options DENY