Fix the overriding of static files in dist-git

This commit is contained in:
Pierre-Yves Chibon 2017-09-05 10:36:06 +02:00
parent 55cc72d160
commit d2fa8a904b

View file

@ -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>