feat(security): security.txt отдаётся, npm audit и SBOM в AppSec
- /.well-known/security.txt уходил в SPA-заглушку (200 text/html): добавлена копия в web/public и явный тип text/plain в статике (RFC 9116, AGENT.md 11.3); - make security дополнен `npm audit --omit=dev --audit-level=high`; - новая цель `make sbom` — CycloneDX-отчёт зависимостей (trivy, если есть).
This commit is contained in:
@@ -63,6 +63,10 @@ func staticContentType(rel string) string {
|
||||
return "text/css; charset=utf-8"
|
||||
case ".svg":
|
||||
return "image/svg+xml"
|
||||
case ".txt":
|
||||
// security.txt (RFC 9116): в минимальном alpine-окружении mime может
|
||||
// не знать расширение и отдать октет-поток.
|
||||
return "text/plain; charset=utf-8"
|
||||
}
|
||||
return mime.TypeByExtension(filepath.Ext(rel))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user