aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2025-01-19 00:47:59 -0500
committerXe Iaso <me@xeiaso.net>2025-01-19 00:47:59 -0500
commit1b8d1729e0a2b4eb38a897c0b70d646c95424606 (patch)
tree9d1f64addfd91a2c66eed66e2ea919b6d67021a7 /cmd
parentda4928a4be32b42813eff3a6655f04f2eab9ff79 (diff)
downloadx-1b8d1729e0a2b4eb38a897c0b70d646c95424606.tar.xz
x-1b8d1729e0a2b4eb38a897c0b70d646c95424606.zip
cmd/anubis: fix logic?
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/anubis/main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/anubis/main.go b/cmd/anubis/main.go
index c3fdbad..b9b907f 100644
--- a/cmd/anubis/main.go
+++ b/cmd/anubis/main.go
@@ -202,7 +202,8 @@ func (s *Server) maybeReverseProxy(w http.ResponseWriter, r *http.Request) {
return
}
- if ckie.Expires.Before(time.Now()) {
+ slog.Debug("cookie expiration time", "expires", ckie.Expires)
+ if !ckie.Expires.IsZero() && ckie.Expires.Before(time.Now()) {
slog.Debug("cookie expired", "path", r.URL.Path)
clearCookie(w)
s.renderIndex(w, r)