fix: regenerate TLS cert when services change (hot-reload via ArcSwap)
HTTPS proxy certs were generated once at startup. Services added at runtime via API or LAN discovery got "not secure" in the browser because their SAN wasn't in the cert. Now the cert is regenerated on every service add/remove and swapped atomically via ArcSwap. In-flight connections are unaffected. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -154,6 +154,15 @@ impl ServiceStore {
|
||||
entries
|
||||
}
|
||||
|
||||
pub fn names(&self) -> Vec<String> {
|
||||
self.entries.keys().cloned().collect()
|
||||
}
|
||||
|
||||
/// Returns true if the name is new (not already registered).
|
||||
pub fn has_name(&self, name: &str) -> bool {
|
||||
self.entries.contains_key(&name.to_lowercase())
|
||||
}
|
||||
|
||||
/// Load user-defined services from ~/.config/numa/services.json
|
||||
pub fn load_persisted(&mut self) {
|
||||
if !self.persist_path.exists() {
|
||||
|
||||
Reference in New Issue
Block a user