distribution/registry
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
..
api registry/api/errcode: split Register to internal / exported 2023-09-04 18:03:00 +02:00
auth registry: unexport auth-related context utilities 2023-10-27 10:58:37 -04:00
handlers registry: unexport auth-related context utilities 2023-10-27 10:58:37 -04:00
listener Improve socket-activation message 2023-09-20 10:31:02 -07:00
middleware Merge pull request #2752 from davidswu/registry-driver-middleware 2023-06-21 10:06:13 -07:00
proxy Move context package internal 2023-10-27 10:58:37 -04:00
storage storage/driver: replace URLFor method 2023-10-27 10:58:37 -04:00
doc.go Move initialization code from main.go to the registry package 2015-09-09 14:39:31 -07:00
registry.go Move context package internal 2023-10-27 10:58:37 -04:00
registry_test.go Move context package internal 2023-10-27 10:58:37 -04:00
root.go Move context package internal 2023-10-27 10:58:37 -04:00