added logging of useragent from pacman

This commit is contained in:
2026-04-30 09:29:34 -06:00
parent 91115c7096
commit 14a87f07f2
+3
View File
@@ -19,6 +19,9 @@ func (s *Server) handlePackage(w http.ResponseWriter, req *http.Request) {
return
}
// record the useragent from requestor
log.Printf("Requestors UA: %s", req.Header.Get("User-Agent"))
// build file paths from the request, they follow archlinux repo
// <mirrorroot>/[core, extra, etc]/os/[x86_64, arm, etc]/package.pkg.tar.zst[.sig]
repo := req.PathValue("repo")