From 98f8dc8710970aac64f786ada514527f939c817b Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 13 Jul 2026 14:21:07 +0200 Subject: [PATCH] Add cache-busting to health check UI assets Introduced a `CacheId` field in `HealthCheckHtmlGenerator` to append unique query strings to CSS and JS file references. This ensures updated assets are fetched by bypassing browser cache after application restarts. Removed static asset references in favor of dynamic ones. --- .../HealthCheck/HealthCheckHtmlGenerator.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ECMJobRunner.WebCron/HealthCheck/HealthCheckHtmlGenerator.cs b/ECMJobRunner.WebCron/HealthCheck/HealthCheckHtmlGenerator.cs index 7bdd1bd..36c5d1c 100644 --- a/ECMJobRunner.WebCron/HealthCheck/HealthCheckHtmlGenerator.cs +++ b/ECMJobRunner.WebCron/HealthCheck/HealthCheckHtmlGenerator.cs @@ -9,6 +9,8 @@ namespace ECMJobRunner.WebCron.HealthCheck; /// public static class HealthCheckHtmlGenerator { + private static readonly string CacheId = Guid.NewGuid().ToString(); + /// /// Generates a complete HTML page for displaying health check results. /// @@ -34,7 +36,7 @@ public static class HealthCheckHtmlGenerator { var sb = new StringBuilder(); - sb.AppendLine(@" + sb.AppendLine(@$" @@ -42,8 +44,8 @@ public static class HealthCheckHtmlGenerator Health Check - ECMJobRunner - - + + ");