mirror of
https://github.com/Pacerino/CaddyProxyManager.git
synced 2026-08-04 19:25:07 -04:00
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).
15 lines
287 B
Handlebars
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}}
|
|
}
|