diff --git a/HaWeb/Program.cs b/HaWeb/Program.cs index 4f7979a..f8190da 100644 --- a/HaWeb/Program.cs +++ b/HaWeb/Program.cs @@ -16,14 +16,15 @@ if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { var p = builder.Configuration.GetValue("WorkingTreePathWindows") + "settings.json"; configpaths.Add(p); builder.Configuration.AddJsonFile(p, optional: true, reloadOnChange: true); -} else { +} +else { var p = builder.Configuration.GetValue("WorkingTreePathLinux") + "settings.json"; configpaths.Add(p); builder.Configuration.AddJsonFile(p, optional: true, reloadOnChange: true); } // Create initial Data -var tS = new XMLTestService(); +var tS = new XMLTestService(); var XMLIS = new XMLInteractionService(builder.Configuration, tS); var hdW = new HaDocumentWrapper(XMLIS, builder.Configuration); var XMLFP = new XMLFileProvider(XMLIS, hdW, builder.Configuration); @@ -43,27 +44,26 @@ builder.Services.AddFeatureManagement(); var app = builder.Build(); // Reload config on change -var cM = new ConfigurationMonitor(configpaths.ToArray(), app.Services); -ChangeToken.OnChange( - () => app.Configuration.GetReloadToken(), - (state) => cM.InvokeChanged(state), - app.Environment -); +// var cM = new ConfigurationMonitor(configpaths.ToArray(), app.Services); +// ChangeToken.OnChange( +// () => app.Configuration.GetReloadToken(), +// (state) => cM.InvokeChanged(state), +// app.Environment +// ); -// Websockets for realtime notification of changes -app.UseWebSockets( new WebSocketOptions { +// // Websockets for realtime notification of changes +app.UseWebSockets(new WebSocketOptions { KeepAliveInterval = TimeSpan.FromMinutes(180), }); app.UseMiddleware(); // Production Options -if (!app.Environment.IsDevelopment()) -{ +if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Home/Error"); // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); app.UseHttpsRedirection(); - app.UseForwardedHeaders(new ForwardedHeadersOptions{ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto}); + app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto }); } app.UseAuthorization(); diff --git a/HaWeb/Views/Shared/_Head.cshtml b/HaWeb/Views/Shared/_Head.cshtml index 1169c87..298ed92 100644 --- a/HaWeb/Views/Shared/_Head.cshtml +++ b/HaWeb/Views/Shared/_Head.cshtml @@ -1,6 +1,6 @@ - + @ViewData["Title"] @@ -9,6 +9,12 @@ --> + + @* Do not index this site, if development or staging *@ + + + + @* Scripts *@ @@ -19,20 +25,19 @@ @* Resources *@ @* We do not preload the graphics since they are embedded in the css by vite. -We dont preload here, because we have 6 requests: +We dont preload here, because we have 6 requests: (0. html & favicon) -1. mark +1. mark 2. htmx 3. fonts.css 4. style.css 5. scripts.js - - - - - - - - *@ - + + + + + + + +*@