From 8cd38d6a4a3fe199390263c5dc6050aa935f5c15 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Wed, 9 Aug 2017 11:25:53 +0200 Subject: [PATCH] First attempt to get multi-static work --- roles/distgit/pagure/templates/z_pagure.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/distgit/pagure/templates/z_pagure.conf b/roles/distgit/pagure/templates/z_pagure.conf index 4ccdf28b8e..408bbc6351 100644 --- a/roles/distgit/pagure/templates/z_pagure.conf +++ b/roles/distgit/pagure/templates/z_pagure.conf @@ -44,3 +44,12 @@ WSGIDaemonProcess pagureproc user=pagure group=packager maximum-requests=1000 di # + +RewriteEngine on + +# First try the instance-specific theme +RewriteCond "/usr/share/pagure_dist_git/static/$1" -f +RewriteRule "^/static/(.*)" "/usr/share/pagure_dist_git/static/$1" [L] + +# Use the application default theme for files not customized +RewriteRule "^/static/(.*)" "/usr/lib/python2.7/site-packages/pagure/static/$1" [L]