summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifests/nginx.pp6
1 files changed, 4 insertions, 2 deletions
diff --git a/manifests/nginx.pp b/manifests/nginx.pp
index 329c21d..d62229f 100644
--- a/manifests/nginx.pp
+++ b/manifests/nginx.pp
@@ -48,8 +48,10 @@ class cgit::nginx {
}.join("\n")
}
- nginx::resource::location {
- $cgit::public_repos.map |$repo| { "~ ^(/${repo}\\.git/.*)" }:
+ # TODO each repo name should be regex-escaped
+ $re = $cgit::public_repos.join('|')
+
+ nginx::resource::location { "~ ^(/(${re})\\.git/.*)" :
server => 'cgit',
ssl_only => $cgit::certname != undef,
priority => 450,