Add person and family detail pages, no-cache responses

This commit is contained in:
Ian Gulliver
2026-08-15 20:39:13 -07:00
parent a37f148657
commit 09888701b3
4 changed files with 583 additions and 11 deletions
+8 -1
View File
@@ -56,6 +56,13 @@ func clientID() string {
return parsed.Web.ClientID
}
func noCache(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "no-cache")
next.ServeHTTP(w, r)
})
}
func main() {
authn := auth.New(clientID(), sessionKey())
cache, err := directory.NewCache(directorySource())
@@ -72,5 +79,5 @@ func main() {
port = "8080"
}
log.Printf("listening on http://localhost:%s", port)
log.Fatal(http.ListenAndServe(":"+port, authn.Wrap(mux)))
log.Fatal(http.ListenAndServe(":"+port, noCache(authn.Wrap(mux))))
}