A vibe coded tangled fork which supports pijul.

appview/state: serve security.txt at /.well-known/

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>

+13
+1
appview/state/router.go
··· 34 34 35 35 router.Get("/pwa-manifest.json", s.WebAppManifest) 36 36 router.Get("/robots.txt", s.RobotsTxt) 37 + router.Get("/.well-known/security.txt", s.SecurityTxt) 37 38 38 39 userRouter := s.UserRouter(&middleware) 39 40 standardRouter := s.StandardRouter(&middleware)
+12
appview/state/state.go
··· 226 226 return s.db.Close() 227 227 } 228 228 229 + func (s *State) SecurityTxt(w http.ResponseWriter, r *http.Request) { 230 + w.Header().Set("Content-Type", "text/plain") 231 + w.Header().Set("Cache-Control", "public, max-age=86400") // one day 232 + 233 + securityTxt := `Contact: mailto:security@tangled.org 234 + Preferred-Languages: en 235 + Canonical: https://tangled.org/.well-known/security.txt 236 + Expires: 2030-01-01T21:59:00.000Z 237 + ` 238 + w.Write([]byte(securityTxt)) 239 + } 240 + 229 241 func (s *State) RobotsTxt(w http.ResponseWriter, r *http.Request) { 230 242 w.Header().Set("Content-Type", "text/plain") 231 243 w.Header().Set("Cache-Control", "public, max-age=86400") // one day