deploy(M00-E): 补充API域名HTTPS检查

This commit is contained in:
Codex
2026-06-15 16:34:36 +08:00
parent c51ba43fa9
commit f5445f16d7
19 changed files with 225 additions and 50 deletions
+27
View File
@@ -0,0 +1,27 @@
$ErrorActionPreference = "Stop"
$Domain = "api.txyundm.cn"
$Origin = "https://$Domain"
$Paths = @(
"/health",
"/app-api/health",
"/admin-api/health"
)
Write-Host "INFO: checking DNS for $Domain"
try {
Resolve-DnsName -Name $Domain -ErrorAction Stop | Select-Object -First 3 | Format-Table -AutoSize
} catch {
Write-Warning "DNS check failed from Windows: $($_.Exception.Message)"
}
foreach ($Path in $Paths) {
$Url = "$Origin$Path"
Write-Host "INFO: probing $Url"
try {
$Response = Invoke-WebRequest -Uri $Url -Method Head -TimeoutSec 10 -ErrorAction Stop
Write-Host "PASS: $Url -> $($Response.StatusCode)"
} catch {
Write-Warning "HTTPS probe failed for ${Url}: $($_.Exception.Message)"
}
}