From 2d1de54c89353cfdcf22d88af1a1cfbfbea4325a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sat, 23 May 2020 21:30:31 +0200 Subject: [PATCH] distgit: Apply Kevin's fix to get the static files to show Basically, we have two places where we apply the rewrite rule allowing to access static files either in pagure-dist-git or in the regular pagure. We had fixed the first one earlier and this commit fixes the second one. Signed-off-by: Pierre-Yves Chibon --- roles/distgit/templates/lookaside-upload.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/distgit/templates/lookaside-upload.conf b/roles/distgit/templates/lookaside-upload.conf index 20aeb316e4..de7120b06c 100644 --- a/roles/distgit/templates/lookaside-upload.conf +++ b/roles/distgit/templates/lookaside-upload.conf @@ -99,7 +99,11 @@ Alias /robots.txt /var/www/robots-src.txt # 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 +{% if env == "staging" %} + RewriteRule "^/static/(.*)" "/usr/lib/python3.6/site-packages/pagure/static/$1" [L] +{% else %} RewriteRule "^/static/(.*)" "/usr/lib/python2.7/site-packages/pagure/static/$1" [L] +{% endif %}