Change nginx site monitoring from HEAD to GET requests

- Fix false negatives for sites that don't handle HEAD requests properly
- Resolves photos.cmtec.se showing error when it actually works fine
- Improves compatibility with modern web applications
This commit is contained in:
Christoffer Martinsson 2025-10-14 21:22:30 +02:00
parent 355a986582
commit 2bffbaa000

View File

@ -852,8 +852,8 @@ impl ServiceCollector {
let start = Instant::now();
// Make HEAD request to avoid downloading content
match client.head(&url).send().await {
// Make GET request for better app compatibility (some apps don't handle HEAD properly)
match client.get(&url).send().await {
Ok(response) => {
let latency = start.elapsed().as_millis() as f32;
let is_healthy = response.status().is_success() || response.status().is_redirection();