From 659d2b9ebc3f7762b5dbf0b6c310a52e704cb438 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Thu, 11 Apr 2019 10:05:37 -0400 Subject: [PATCH] last-modified caching interferes with debug --- honk.go | 4 +++- views/honkform.html | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/honk.go b/honk.go index 26646a9..7d9aefc 100644 --- a/honk.go +++ b/honk.go @@ -177,8 +177,10 @@ func homepage(w http.ResponseWriter, r *http.Request) { if len(honks) > 0 { modtime = honks[0].Date } + debug := false + getconfig("debug", &debug) imh := r.Header.Get("If-Modified-Since") - if imh != "" && !modtime.IsZero() { + if !debug && imh != "" && !modtime.IsZero() { ifmod, err := time.Parse(http.TimeFormat, imh) if err == nil && !modtime.After(ifmod) { w.WriteHeader(http.StatusNotModified) diff --git a/views/honkform.html b/views/honkform.html index a6df956..da83370 100644 --- a/views/honkform.html +++ b/views/honkform.html @@ -2,7 +2,7 @@