distribution/registry/storage/driver
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
..
azure storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
base storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
factory go.mod: change imports to github.com/distribution/distribution/v3 2021-02-08 18:30:46 +01:00
filesystem storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
gcs storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
inmemory storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
middleware storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
s3-aws storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
testsuites storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
errors_test.go refactor: Storage driver errors 2023-10-18 10:02:21 +01:00
fileinfo.go format code with gofumpt 2022-11-03 22:48:20 +01:00
storagedriver.go storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
walk.go Pass the last paging flag to storage drivers 2023-08-29 11:27:42 +01:00
walk_test.go Pass the last paging flag to storage drivers 2023-08-29 11:27:42 +01:00