fix(hub): prevent proxy caching of systemd details (#2456)

Co-authored-by: hank <hank@henrygd.me>
This commit is contained in:
user01010111
2026-09-30 03:54:17 +13:00
committed by GitHub
parent 4422be717c
commit 24881fbfdf
2 changed files with 109 additions and 1 deletions

View File

@@ -446,7 +446,8 @@ func (h *Hub) getSystemdInfo(e *core.RequestEvent) error {
if err != nil {
return e.InternalServerError("", err)
}
e.Response.Header().Set("Cache-Control", "public, max-age=60")
e.Response.Header().Set("Cache-Control", "private, max-age=60")
e.Response.Header().Add("Vary", "Authorization")
return e.JSON(http.StatusOK, map[string]any{"details": details})
}