Files
CaddyProxyManager/backend/embed/caddy/host.hbs
Pacerino 7ff0949067 [Backend] Add Caddy provider abstraction with Caddyfile and API modes
Introduce a Provider interface selectable via CPM_CADDY_MODE:
- CaddyfileProvider renders per-host snippets (template whitespace fixed)
- APIProvider manages Caddy's JSON config via the admin API
Add configurable reload strategy (systemd/exec/api/none) and a
configurable listen address for the bootstrapped server in API mode.
Includes unit tests for the JSON builder, provider factory and the
API provider (httptest).
2026-06-14 02:34:54 +02:00

15 lines
287 B
Handlebars

{{host.domains}} {
{{#if host.upstreams}}
{{#if host.matcher}}
reverse_proxy {{host.matcher}}{{#each host.upstreams}} {{backend}}{{/each}}
{{else}}
reverse_proxy{{#each host.upstreams}} {{backend}}{{/each}}
{{/if}}
{{/if}}
{{#if LogPath}}
log {
output file {{LogPath}}
}
{{/if}}
}