From 5997ec0f838cac48e9171b10781f0c4c82787122 Mon Sep 17 00:00:00 2001 From: Jan-Lukas Else Date: Mon, 15 Nov 2021 12:49:18 +0100 Subject: [PATCH] Add noindex header to login page --- authentication.go | 1 + 1 file changed, 1 insertion(+) diff --git a/authentication.go b/authentication.go index c56e291..55bb35a 100644 --- a/authentication.go +++ b/authentication.go @@ -53,6 +53,7 @@ func (a *goBlog) authMiddleware(next http.Handler) http.Handler { } // Show login form w.Header().Set("Cache-Control", "no-store,max-age=0") + w.Header().Set("X-Robots-Tag", "noindex") h, _ := json.Marshal(r.Header) b, _ := io.ReadAll(io.LimitReader(r.Body, 20*1000*1000)) // Only allow 20 MB _ = r.Body.Close()