aboutsummaryrefslogtreecommitdiff
path: root/internal/frontend/server.go
diff options
context:
space:
mode:
authorEthan Lee <ethanalee@google.com>2026-03-11 21:30:08 +0000
committerGopher Robot <gobot@golang.org>2026-03-30 13:36:55 -0700
commited9f544b260433d32a59bb7e9b52d7cafda78eec (patch)
tree48cb3a336a7a16de3f777f836ad2be1b57591a65 /internal/frontend/server.go
parent8514eebca6ca7b3213e879faa2a83c7e9ea6e181 (diff)
downloadgo-x-pkgsite-ed9f544b260433d32a59bb7e9b52d7cafda78eec.tar.xz
internal/api: implement vulnerabilities endpoint
- Create vulnerabilities endpoint using server vuln client. Change-Id: I234c96851f7682a13bda97aa3e5018d0439e05da Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/754866 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ethan Lee <ethanalee@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> kokoro-CI: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'internal/frontend/server.go')
-rw-r--r--internal/frontend/server.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/frontend/server.go b/internal/frontend/server.go
index d6a7fa01..34fcaab5 100644
--- a/internal/frontend/server.go
+++ b/internal/frontend/server.go
@@ -243,6 +243,7 @@ func (s *Server) Install(handle func(string, http.Handler), cacher Cacher, authV
handle("GET /v1/versions/", s.errorHandler(api.ServeModuleVersions))
handle("GET /v1/packages/", s.errorHandler(api.ServeModulePackages))
handle("GET /v1/search", s.errorHandler(api.ServeSearch))
+ handle("GET /v1/vulns/", s.errorHandler(api.ServeVulnerabilities(s.vulnClient)))
handle("/opensearch.xml", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
serveFileFS(w, r, s.staticFS, "shared/opensearch.xml")
}))