admin-cert request: refresh the stored CA for the same region (it may have been rotated)
CI / agent (push) Successful in 3s
CI / site (push) Successful in 2s
CI / go (push) Successful in 33s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-28 17:48:40 +01:00
1 parent 53c05bb44d
commit ada6566534
1 file changed
+2 -2
+2 -2
View File
@@ -147,8 +147,8 @@ func (c *client) requestAdminCert(name string) error {
if cc.URL == "" {
cc.URL = c.base
}
if cc.CA == "" {
cc.CA = res.CA
if cc.CA == "" || strings.TrimRight(cc.URL, "/") == strings.TrimRight(c.base, "/") {
cc.CA = res.CA // the region's current CA (it may have been rotated since)
}
cc.Cert, cc.Key = certFile, keyFile
if err := saveClientConf(cc); err != nil {