[control] Fix round 1: changes apply while Caddy serves (admin socket, watch through Caddy), revocations that fail are errors and catch up, proof only on the forward-auth UI host, root keys found by content, intermediates checked before install, stale SNI cleared before each handshake
This commit is contained in:
@@ -41,6 +41,9 @@ pub struct CompileOptions {
|
||||
pub caddy_credentials_dir: String,
|
||||
/// Caddy admin endpoint; `None` disables the admin API.
|
||||
pub caddy_admin: Option<SocketAddr>,
|
||||
/// Caddy admin endpoint on a Unix socket (mode 0660), which control uses to load a changed
|
||||
/// config while Caddy serves. Takes precedence over `caddy_admin`.
|
||||
pub caddy_admin_socket: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
|
||||
@@ -73,6 +76,12 @@ pub fn caddy(model: &Model, options: &CompileOptions) -> Result<String, CompileE
|
||||
}
|
||||
|
||||
fn check_options(o: &CompileOptions) -> Result<(), CompileError> {
|
||||
if let Some(s) = &o.caddy_admin_socket {
|
||||
check_path(s).map_err(|reason| CompileError::BadOption {
|
||||
option: "caddy_admin_socket",
|
||||
reason,
|
||||
})?;
|
||||
}
|
||||
for (option, value) in [
|
||||
("cert_dir", &o.cert_dir),
|
||||
("state_dir", &o.state_dir),
|
||||
|
||||
Reference in New Issue
Block a user