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:
parent
df15370222
commit
32a3c0c43f
1 changed files with 48 additions and 0 deletions
|
@ -32,6 +32,7 @@ RewriteRule ^/v2/(.*)$ http://oci-registry01:5000/v2/$1 [P,L]
|
||||||
{% endif %}
|
{% endif %}
|
||||||
RewriteRule ^/v2/(.*)$ http://localhost:10048/v2/$1 [P,L]
|
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}" &annotation(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||||
RewriteCond "&%{QUERY_STRING}" &tag=testing
|
RewriteCond "&%{QUERY_STRING}" &tag=testing
|
||||||
RewriteCond "&%{QUERY_STRING}" &architecture=([^&]+)
|
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
|
RewriteCond "&%{QUERY_STRING}" &label(%3A|:)org.flatpak.ref(%3A|:)exists=1
|
||||||
RewriteRule "^/index/static$" /index/flatpak-labels.json [L,PT]
|
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/
|
DocumentRoot /srv/web/registry-index/
|
||||||
|
|
||||||
|
@ -87,6 +121,9 @@ SSLOptions +FakeBasicAuth
|
||||||
|
|
||||||
Alias "/index/" "/srv/web/registry-index/index/"
|
Alias "/index/" "/srv/web/registry-index/index/"
|
||||||
Alias "/app-icons/" "/srv/web/registry-index/icons/"
|
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/">
|
<Directory “/srv/web/registry-index/index/">
|
||||||
Options +FollowSymLinks
|
Options +FollowSymLinks
|
||||||
|
@ -106,3 +143,14 @@ Alias "/app-icons/" "/srv/web/registry-index/icons/"
|
||||||
Options +Indexes
|
Options +Indexes
|
||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</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 %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue