Fix example caddyfile by adding rewrite for /api

This commit is contained in:
Julian Müller (ChaoticByte) 2024-02-01 19:12:26 +01:00
parent e76131fabb
commit 3b9fab0ebb

View file

@ -3,11 +3,12 @@
} }
https://example.org { https://example.org {
root * ./static rewrite /api /api/
route /api/* { route /api/* {
uri strip_prefix /api uri strip_prefix /api
reverse_proxy localhost:8000 reverse_proxy localhost:8000
} }
root * ./static
respond /settings.json "\{\"api_url\": \"https://{http.request.hostport}/api\"\}" respond /settings.json "\{\"api_url\": \"https://{http.request.hostport}/api\"\}"
file_server file_server
header { header {