Browse Source

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
changes/64/773164/1
Alex Schultz 5 months ago
parent
commit
4b47fdc93d
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      tripleo_ansible/roles/tripleo_image_serve/templates/image-serve.conf.j2

+ 10
- 0
tripleo_ansible/roles/tripleo_image_serve/templates/image-serve.conf.j2 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>

Loading…
Cancel
Save