# Caddy config for the share-link service. # # The frontend (served under /fabula/) calls /fabula/api/s, but the Go service # routes plain /api/s. `uri strip_prefix /fabula` rewrites /fabula/api/s -> # /api/s before proxying to the service on loopback. # # Place this INSIDE your existing site block, and make sure this /fabula/api/* # handler comes BEFORE the static handler that serves /fabula/* — `handle` # blocks match in source order, first match wins. handle /fabula/api/* { uri strip_prefix /fabula reverse_proxy 127.0.0.1:8090 } # ... your existing static file handler for /fabula/* follows here, e.g.: # # handle /fabula/* { # root * /usr/share/caddy/public_html # file_server # }