From eee8781b676a95005dc98a88f5803e7709b087b4 Mon Sep 17 00:00:00 2001 From: Runxi Yu <me@runxiyu.org> Date: Mon, 24 Mar 2025 23:51:03 +0800 Subject: Cache-Control --- handler.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handler.go b/handler.go index f9282fd..8f30c4c 100644 --- a/handler.go +++ b/handler.go @@ -59,6 +59,9 @@ func handler(writer http.ResponseWriter, request *http.Request) { // since all parameters but the message are constant at this // point. challengePage := func(message string) { + writer.Header().Set("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0, private") + writer.Header().Set("Pragma", "no-cache") + writer.Header().Set("Expires", "0") err := tmpl.Execute(writer, tparams{ Identifier: base64.StdEncoding.EncodeToString(identifier), Message: message, -- cgit v1.2.3