diff --git a/app/internal/handler/handler.go b/app/internal/handler/handler.go index 179107d..100aa31 100644 --- a/app/internal/handler/handler.go +++ b/app/internal/handler/handler.go @@ -131,7 +131,7 @@ func (h *Handler) serverError(w http.ResponseWriter, r *http.Request, err error) func (h *Handler) security(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Security-Policy", "default-src 'self'; style-src 'self'; form-action 'self'; frame-ancestors 'none'; base-uri 'self'") - w.Header().Set("Referrer-Policy", "no-referrer") + w.Header().Set("Referrer-Policy", "same-origin") w.Header().Set("X-Content-Type-Options", "nosniff") w.Header().Set("X-Frame-Options", "DENY") next.ServeHTTP(w, r) diff --git a/app/internal/handler/handler_test.go b/app/internal/handler/handler_test.go index 3a2126f..a6fc779 100644 --- a/app/internal/handler/handler_test.go +++ b/app/internal/handler/handler_test.go @@ -56,6 +56,9 @@ func TestListRendersEscapedTodos(t *testing.T) { if strings.Contains(recorder.Body.String(), "