Handle containers with no namespace

Satellite server does not have an actual namespace in the url so the
container location is just host/container:tag. We need to be able to
properly set the headers on blobs without namespaces.

Change-Id: Ia6728d68305ba3c662e99ea067b4d4feef9eeea0
Related-Bug: #1913782
This commit is contained in:
Alex Schultz 2021-01-29 11:18:47 -07:00
parent dcd18fa053
commit 4b47fdc93d
1 changed files with 10 additions and 0 deletions

View File

@ -28,4 +28,14 @@ Listen {{ tripleo_container_registry_port }}
Header set Cache-Control "max-age=31536000"
Header set Content-Type "application/octet-stream"
</LocationMatch>
<LocationMatch "^/v2/.*/blobs/sha256:.*$">
SetEnvIf Request_URI "sha256:(.*)$" digest=sha256:$1
Header set Docker-Content-Digest "%{digest}e"
Header set ETag "%{digest}e"
Header set Cache-Control "max-age=31536000"
Header set Content-Type "application/octet-stream"
</LocationMatch>
</VirtualHost>