feat(dns): serve machine IP at /.uncloud-verify to verify Caddy reachability

This commit is contained in:
Pavel Sviderski
2025-02-25 17:36:44 +10:00
parent 0ea997e826
commit d0fd9db258
2 changed files with 57 additions and 8 deletions
+3 -1
View File
@@ -357,7 +357,9 @@ func (m *Machine) Run(ctx context.Context) error {
),
)
caddyfileCtrl, err := caddyfile.NewController(m.store, m.config.CaddyfilePath)
// Create a new Caddyfile controller for managing the Caddy reverse proxy configuration.
// It will also serve the current machine ID at /.uncloud-verify to verify Caddy reachability.
caddyfileCtrl, err := caddyfile.NewController(m.store, m.config.CaddyfilePath, m.state.ID)
if err != nil {
return fmt.Errorf("create Caddyfile controller: %w", err)
}