mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
reversepassproxy.registry-generic.conf: Set up for flatpak-indexer for staging
Add changes required for flatpak-indexer, conditionalized for staging: * Reverse which of "index with labels" or "index with annotations" is the default (make labels the default, since annotations are only used by old versions of Flatpak) * Add the deltas/ directory which holds deltas between Flatpak versions. Signed-off-by: Owen W. Taylor <otaylor@fishsoup.net>
This commit is contained in:
@@ -32,6 +32,7 @@ RewriteRule ^/v2/(.*)$ http://oci-registry01:5000/v2/$1 [P,L]
|
||||
{% endif %}
|
||||
RewriteRule ^/v2/(.*)$ http://localhost:10048/v2/$1 [P,L]
|
||||
|
||||
{% if env == "production" %}
|
||||
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteCond "&%{QUERY_STRING}" &tag=testing
|
||||
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
|
||||
@@ -63,6 +64,39 @@ RewriteRule "^/index/static$" /index/flatpak.json [L,PT]
|
||||
|
||||
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteRule "^/index/static$" /index/flatpak-labels.json [L,PT]
|
||||
{% elif env == "staging" %}
|
||||
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteCond "&%{QUERY_STRING}" &tag=testing
|
||||
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
|
||||
RewriteRule "^/index/static$" /index/flatpak-testing-%1.json [L,PT]
|
||||
|
||||
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteCond "&%{QUERY_STRING}" &tag=testing
|
||||
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
|
||||
RewriteRule "^/index/static$" /index/flatpak-testing-%1-annotations.json [L,PT]
|
||||
|
||||
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
|
||||
RewriteRule "^/index/static$" /index/flatpak-%1.json [L,PT]
|
||||
|
||||
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
|
||||
RewriteRule "^/index/static$" /index/flatpak-%1-annotations.json [L,PT]
|
||||
|
||||
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteCond "&%{QUERY_STRING}" &tag=testing
|
||||
RewriteRule "^/index/static$" /index/flatpak-testing.json [L,PT]
|
||||
|
||||
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteCond "&%{QUERY_STRING}" &tag=testing
|
||||
RewriteRule "^/index/static$" /index/flatpak-testing-annotations.json [L,PT]
|
||||
|
||||
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteRule "^/index/static$" /index/flatpak.json [L,PT]
|
||||
|
||||
RewriteCond "&%{QUERY_STRING}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||
RewriteRule "^/index/static$" /index/flatpak-annotations.json [L,PT]
|
||||
{% endif %}
|
||||
|
||||
DocumentRoot /srv/web/registry-index/
|
||||
|
||||
@@ -87,6 +121,9 @@ SSLOptions +FakeBasicAuth
|
||||
|
||||
Alias "/index/" "/srv/web/registry-index/index/"
|
||||
Alias "/app-icons/" "/srv/web/registry-index/icons/"
|
||||
{% if env == "staging" %}
|
||||
Alias "/deltas/" "/srv/web/registry-index/deltas/"
|
||||
{% endif %}
|
||||
|
||||
<Directory “/srv/web/registry-index/index/">
|
||||
Options +FollowSymLinks
|
||||
@@ -106,3 +143,14 @@ Alias "/app-icons/" "/srv/web/registry-index/icons/"
|
||||
Options +Indexes
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
{% if env == "staging" %}
|
||||
<Directory "/srv/web/registry-index/deltas/">
|
||||
ExpiresActive on
|
||||
ExpiresDefault "access plus 1 year"
|
||||
|
||||
AllowOverride None
|
||||
Options +Indexes
|
||||
Require all granted
|
||||
</Directory>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user