Fix: Update online status check to account for HTTP 405 response

This commit is contained in:
headlessdev 2025-04-17 14:41:50 +02:00
parent edbc72a7c9
commit d6889a27b5

View File

@ -131,7 +131,7 @@ func checkAndUpdateStatus(db *sql.DB, client *http.Client, apps []Application) {
resp.Body.Close() // Important to prevent leaks resp.Body.Close() // Important to prevent leaks
} }
isOnline := err == nil && resp != nil && resp.StatusCode >= 200 && resp.StatusCode < 300 isOnline := err == nil && resp != nil && resp.StatusCode >= 200 && resp.StatusCode < 300 || resp.StatusCode == 405
// Database Update // Database Update
dbCtx, dbCancel := context.WithTimeout(context.Background(), 5*time.Second) dbCtx, dbCancel := context.WithTimeout(context.Background(), 5*time.Second)