distribution/registry/storage
Cory Snider f089932de0 storage/driver: replace URLFor method
Several storage drivers and storage middlewares need to introspect the
client HTTP request in order to construct content-redirect URLs. The
request is indirectly passed into the driver interface method URLFor()
through the context argument, which is bad practice. The request should
be passed in as an explicit argument as the method is only called from
request handlers.

Replace the URLFor() method with a RedirectURL() method which takes an
HTTP request as a parameter instead of a context. Drop the options
argument from URLFor() as in practice it only ever encoded the request
method, which can now be fetched directly from the request. No URLFor()
callers ever passed in an "expiry" option, either.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-10-27 10:58:37 -04:00
..
cache Move context package internal 2023-10-27 10:58:37 -04:00
driver storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
blob_test.go deprecate reference package, migrate to github.com/distribution/reference 2023-08-31 15:47:06 +02:00
blobserver.go storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
blobstore.go Move context package internal 2023-10-27 10:58:37 -04:00
blobwriter.go Move context package internal 2023-10-27 10:58:37 -04:00
blobwriter_nonresumable.go Move context package internal 2023-10-27 10:58:37 -04:00
blobwriter_resumable.go format code with gofumpt 2022-11-03 22:48:20 +01:00
catalog.go Merge pull request #4031 from thaJeztah/migrate_reference 2023-08-31 15:20:28 +01:00
catalog_test.go Merge pull request #4031 from thaJeztah/migrate_reference 2023-08-31 15:20:28 +01:00
doc.go Move storage package under registry package 2015-02-11 12:43:04 -08:00
error.go Remove old walk function 2018-01-18 13:06:07 -08:00
filereader.go replace deprecated io/ioutil 2022-11-04 23:47:52 +01:00
filereader_test.go Move context package internal 2023-10-27 10:58:37 -04:00
garbagecollect.go deprecate reference package, migrate to github.com/distribution/reference 2023-08-31 15:47:06 +02:00
garbagecollect_test.go Move context package internal 2023-10-27 10:58:37 -04:00
io.go replace deprecated io/ioutil 2022-11-04 23:47:52 +01:00
linkedblobstore.go Move context package internal 2023-10-27 10:58:37 -04:00
linkedblobstore_test.go deprecate reference package, migrate to github.com/distribution/reference 2023-08-31 15:47:06 +02:00
manifestlisthandler.go Move context package internal 2023-10-27 10:58:37 -04:00
manifeststore.go Move context package internal 2023-10-27 10:58:37 -04:00
manifeststore_test.go deprecate reference package, migrate to github.com/distribution/reference 2023-08-31 15:47:06 +02:00
ociindexhandler.go Move context package internal 2023-10-27 10:58:37 -04:00
ocimanifesthandler.go Move context package internal 2023-10-27 10:58:37 -04:00
ocimanifesthandler_test.go registry: verify digest and check blob presence when put manifest 2021-04-16 16:11:52 +08:00
paths.go add repositoriesRootPathSpec in pathFor documentation 2023-09-26 15:07:49 +08:00
paths_test.go format code with gofumpt 2022-11-03 22:48:20 +01:00
purgeuploads.go Switch to github.com/google/uuid 2023-10-25 12:15:21 +01:00
purgeuploads_test.go Switch to github.com/google/uuid 2023-10-25 12:15:21 +01:00
registry.go storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
schema2manifesthandler.go Move context package internal 2023-10-27 10:58:37 -04:00
schema2manifesthandler_test.go Move context package internal 2023-10-27 10:58:37 -04:00
tagstore.go use manifestTagsPathSpec for listing all tags 2023-09-28 10:44:46 +08:00
tagstore_test.go deprecate reference package, migrate to github.com/distribution/reference 2023-08-31 15:47:06 +02:00
vacuum.go Move context package internal 2023-10-27 10:58:37 -04:00