log 404s and other log improvements.

This commit is contained in:
fiatjaf
2024-10-06 15:56:20 -03:00
parent a5dac15262
commit 84b81654f0
9 changed files with 14 additions and 10 deletions

View File

@@ -25,6 +25,7 @@ func renderProfile(ctx context.Context, r *http.Request, w http.ResponseWriter,
profile, err := sys.FetchProfileFromInput(ctx, code)
if err != nil || profile.Event == nil {
log.Warn().Err(err).Str("code", code).Msg("event not found on render_profile")
w.Header().Set("Cache-Control", "max-age=60")
w.WriteHeader(http.StatusNotFound)