Trim comments to the non-obvious why
Test and deploy / test (push) Successful in 28s
Test and deploy / deploy (push) Successful in 31s

Drop narration, history and restated-code comments across the repo,
keep short ones for security boundaries, upstream quirks and ordering
constraints, and record the convention in CLAUDE.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-24 20:49:03 +00:00
co-authored by Claude Opus 5.5
parent effddd2794
commit 4530cb8dc4
222 changed files with 1173 additions and 5423 deletions
+2 -7
View File
@@ -7,10 +7,7 @@ import (
"github.com/gin-gonic/gin"
)
// GetNoteFile serves one file from the notes directory for the admin-only
// route GET /notes/*path. The wildcard means `path` arrives with a leading
// slash and may contain further slashes, so it has to be validated rather
// than trusted — Notes.ParsePath does the containment check.
// GetNoteFile: Notes.ParsePath does the containment check.
func (store *Store) GetNoteFile(ctx *gin.Context) {
path := ctx.Param("path")
@@ -29,9 +26,7 @@ func (store *Store) GetNoteFile(ctx *gin.Context) {
return
}
// The SPA reads Last-Modified to show a note's edit date. Browsers hide
// non-safelisted headers from cross-origin fetch() unless they are listed
// in Access-Control-Expose-Headers, hence the second header.
// Exposed so cross-origin fetch() can read it.
ctx.Header("Last-Modified", info.ModTime().UTC().Format(http.TimeFormat))
ctx.Header("Access-Control-Expose-Headers", "Content-Disposition, Last-Modified")