From 14a87f07f21b6d7422c18594458d13538c454348 Mon Sep 17 00:00:00 2001 From: Eric Phillips Date: Thu, 30 Apr 2026 09:29:34 -0600 Subject: [PATCH] added logging of useragent from pacman --- handlerPkgs.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/handlerPkgs.go b/handlerPkgs.go index e76fd01..fb881b7 100644 --- a/handlerPkgs.go +++ b/handlerPkgs.go @@ -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 // /[core, extra, etc]/os/[x86_64, arm, etc]/package.pkg.tar.zst[.sig] repo := req.PathValue("repo")