diff --git a/internal/auth/auth.go b/internal/auth/auth.go
index cd89369c..df618a3f 100644
--- a/internal/auth/auth.go
+++ b/internal/auth/auth.go
@@ -305,8 +305,13 @@ func (auth *Authentication) SaveSession(rw http.ResponseWriter, r *http.Request,
if auth.SessionMaxAge != 0 {
session.Options.MaxAge = int(auth.SessionMaxAge.Seconds())
}
- if config.Keys.HTTPSCertFile == "" && config.Keys.HTTPSKeyFile == "" {
- cclog.Warn("HTTPS not configured - session cookies will not have Secure flag set (insecure for production)")
+ if r.TLS == nil && r.Header.Get("X-Forwarded-Proto") != "https" {
+ // If neither TLS or an encrypted reverse proxy are used, do not mark cookies as secure.
+ cclog.Warn("Authenticating with unencrypted request. Session cookies will not have Secure flag set (insecure for production)")
+ if r.Header.Get("X-Forwarded-Proto") == "" {
+ // This warning will not be printed if e.g. X-Forwarded-Proto == http
+ cclog.Warn("If you are using a reverse proxy, make sure X-Forwarded-Proto is set")
+ }
session.Options.Secure = false
}
session.Options.SameSite = http.SameSiteStrictMode
diff --git a/web/frontend/src/DashPublic.root.svelte b/web/frontend/src/DashPublic.root.svelte
index 0c66d867..c758ed37 100644
--- a/web/frontend/src/DashPublic.root.svelte
+++ b/web/frontend/src/DashPublic.root.svelte
@@ -6,9 +6,6 @@
-->
-
-
-
+
+
+ {
+ from = new Date(Date.now() - 5 * 60 * 1000);
+ to = new Date(Date.now());
+ clusterFrom = new Date(Date.now() - (8 * 60 * 60 * 1000))
+
+ if (interval) stackedFrom += Math.floor(interval / 1000);
+ else stackedFrom += 1 // Workaround: TimeSelection not linked, just trigger new data on manual refresh
+ }}
+ />
+
+
+
+{#if $statusQuery.fetching || $statesTimed.fetching}
+
+