cloudflare / serverless-registry

A container registry backed by Workers and R2.
Apache License 2.0
994 stars 35 forks source link

Bug: Paginated responses "recurse" parameters #75

Closed theoriginalgri closed 2 days ago

theoriginalgri commented 2 days ago

/v2/:name+/tags/list uses req.url to construct the Link for the next page. This logic is also used in the /:name+/manifests/:reference endpoint.

Since req.url also contains the query parameters, this builds urls like /v2/:name+/tags/list?n=50&last=348f1ef4?n=50&last=87dcd12f for page three. Due to new parameters being appended, this leads a client to effectively request /v2/:name+/tags/list?n=50&last=348f1ef4 (the parameters from page two) indefinitely.

gabivlj commented 2 days ago

Thx for noticing and reporting @theoriginalgri. Opened a branch: https://github.com/cloudflare/serverless-registry/pull/76