summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Yves Chibon <pingou@pingoured.fr>2017-09-05 10:36:06 +0200
committerPierre-Yves Chibon <pingou@pingoured.fr>2017-09-05 10:36:06 +0200
commitd2fa8a904bd0216ac22c5ac33c159571f33f6acb (patch)
tree7435792dd77116c3879cc32aa061d7469b1bf276
parent55cc72d1604de7aa18883b993977c8c7b0de0371 (diff)
downloadansible-d2fa8a904bd0216ac22c5ac33c159571f33f6acb.tar.gz
ansible-d2fa8a904bd0216ac22c5ac33c159571f33f6acb.tar.xz
ansible-d2fa8a904bd0216ac22c5ac33c159571f33f6acb.zip
Fix the overriding of static files in dist-git
-rw-r--r--roles/distgit/templates/lookaside-upload.conf15
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/distgit/templates/lookaside-upload.conf b/roles/distgit/templates/lookaside-upload.conf
index fcfff76c5..eab5f169f 100644
--- a/roles/distgit/templates/lookaside-upload.conf
+++ b/roles/distgit/templates/lookaside-upload.conf
@@ -66,5 +66,20 @@ SSLCryptoDevice builtin
Require valid-user
</Location>
+
+ # Insert the redirect rules allowing pagure to override some of its static
+ # files. This is pagure related not so much lookaside related but since this
+ # is using a VirtualHost on port 80 we need to group the configs
+
+ # Configure static files so that a custom theme can override the defaults
+ RewriteEngine on
+
+ # Check if the static file exists in the template directory
+ RewriteCond "/usr/share/pagure_dist_git/static/$1" -f
+ # If it does, use it
+ RewriteRule "^/static/(.*)" "/usr/share/pagure_dist_git/static/$1" [L]
+ # Otherwise back out and use the default static folder/theme
+ RewriteRule "^/static/(.*)" "/usr/lib/python2.7/site-packages/pagure/static/$1" [L]
+
</VirtualHost>