Skip to content
This repository was archived by the owner on Jul 4, 2026. It is now read-only.

Commit d2498d1

Browse files
committed
feat: /dl/ supports multi-segment repository names
1 parent 7155746 commit d2498d1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

server/server.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,9 @@ func (s *Server) setupRoutes(ctx context.Context) {
163163
api.HandleFunc("/repositories/{name:.+}/tags", s.apiListTags).Methods(http.MethodGet)
164164
api.HandleFunc("/repositories/{name:.+}", s.apiGetRepository).Methods(http.MethodGet)
165165

166-
// Public artifact download (auth-exempt, single canonical path).
167-
s.router.HandleFunc("/dl/{name}", s.handleArtifactDownload).Methods(http.MethodGet)
166+
// Public artifact download (auth-exempt). {name:.+} matches multi-segment
167+
// repository names like windows/win11 so /dl/windows/win11 routes correctly.
168+
s.router.HandleFunc("/dl/{name:.+}", s.handleArtifactDownload).Methods(http.MethodGet)
168169

169170
// Frontend — embedded UI catches everything else under `/`.
170171
uiFS, err := fs.Sub(ui.FS, ".")

0 commit comments

Comments
 (0)