diff --git a/internal/frontend/server.go b/internal/frontend/server.go
index cd768a62f..794a55988 100644
--- a/internal/frontend/server.go
+++ b/internal/frontend/server.go
@@ -193,6 +193,7 @@ Disallow: /fetch/*
Sitemap: https://pkg.go.dev/sitemap/index.xml
`))
}))
+ handle("/opensearch.xml", s.opensearchHandler())
s.installDebugHandlers(handle)
}
@@ -466,6 +467,21 @@ func (s *Server) aboutHandler() http.HandlerFunc {
})
}
+func (s *Server) opensearchHandler() http.HandlerFunc {
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("Content-Type", "application/opensearchdescription+xml")
+ http.ServeContent(w, r, "", time.Time{}, strings.NewReader(`
+