From aa0a4aa401fb28e16cf0066ba20312f940acc75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20M=C3=BCller=20=28ChaoticByte=29?= Date: Thu, 1 Feb 2024 18:07:51 +0100 Subject: [PATCH] Removed settings.json from static files, added it to the caddy file as dynamic respond directive --- Caddyfile_example | 3 ++- static/settings.json | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 static/settings.json diff --git a/Caddyfile_example b/Caddyfile_example index 02b28d8..275fb00 100644 --- a/Caddyfile_example +++ b/Caddyfile_example @@ -2,8 +2,9 @@ admin off } -http://127.0.0.1:8001 { +:8001 { root * ./static + respond /settings.json "\{\"api_url\": \"http://{http.request.host}:8000\"\}" file_server header { X-Frame-Options DENY diff --git a/static/settings.json b/static/settings.json deleted file mode 100644 index a6fb3e2..0000000 --- a/static/settings.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "api_url": "http://127.0.0.1:8000" -}