···1818// Server is the container struct for the HTTP server
1919type Server struct {
2020 port int
2121- mux *chi.Mux
2121+ Mux *chi.Mux
2222}
23232424// ListenAndServe simply wraps http.ListenAndServe to contain the functionality here
2525func (s Server) ListenAndServe() error {
2626- return http.ListenAndServe(fmt.Sprintf("localhost:%d", s.port), s.mux)
2626+ return http.ListenAndServe(fmt.Sprintf("localhost:%d", s.port), s.Mux)
2727}
28282929// Settings is the configuration for the HTTP server
···3434 Port int
3535 RepoDir string
3636 Profile Profile
3737+ ShowPrivate bool
3738}
38393940// Profile is the index profile
···101102 r.Get("/tailwind.css", html.TailwindHandler)
102103 })
103104104104- return Server{mux: mux, port: settings.Port}
105105+ return Server{Mux: mux, port: settings.Port}
105106}
106107107108type repoHandler struct {
+1-1
internal/http/index.go
···3030 if err != nil {
3131 return httperr.Error(err)
3232 }
3333- if repo.Meta.Private {
3333+ if repo.Meta.Private && !rh.s.ShowPrivate {
3434 continue
3535 }
3636 if tagFilter != "" && !slices.Contains(repo.Meta.Tags, strings.ToLower(tagFilter)) {
+1-1
internal/http/middleware.go
···2626 }
2727 return httperr.Status(err, httpErr)
2828 }
2929- if repo.Meta.Private {
2929+ if repo.Meta.Private && !rh.s.ShowPrivate {
3030 return httperr.Status(errors.New("could not get git repo"), http.StatusNotFound)
3131 }
3232 r = r.WithContext(context.WithValue(r.Context(), repoCtxKey, repo))